Support for Field Types in Aggregate Functions
Aggregate functions are supported for several primitive data types and field types. The following table lists support by the aggregate functions for the primitive data types.
Data Type | AVG() | COUNT() | COUNT_DISTINCT() | MIN() | MAX() | SUM() |
---|---|---|---|---|---|---|
base64 | No | No | No | No | No | No |
boolean | No | No | No | No | No | No |
byte | No | No | No | No | No | No |
date | No | Yes | Yes | Yes | Yes | No |
dateTime | No | Yes | Yes | Yes | Yes | No |
double | Yes | Yes | Yes | Yes | Yes | Yes |
int | Yes | Yes | Yes | Yes | Yes | Yes |
string | No | Yes | Yes | Yes | Yes | No |
time | No | No | No | No | No | No |
In addition to the primitive data types, the API uses an extended set of field types for object fields. The following table lists support by the aggregate functions for these field types.
* Calculated fields are custom fields defined by a formula, which is an algorithm that derives its value from other fields, expressions, or values. Therefore, support for aggregate functions depends on the type of the calculated field.
** Aggregate function results on currency fields default to the system currency.