As of release 34.0, Export ZOQL supports several aggregate functions, detailed below.
Note that Export ZOQL is used for creating exports from Zuora data sources, and uses a different syntax than standard ZOQL.
avg() to return the average value.
avg() function supports only numeric values.
select A.a,avg(A.c) from A group by A.a, B.b
count() to return the number of rows. Similar to standard SQL, you can use the following syntax with
count() command is the only Export ZOQL command that supports the use of an asterisk (
select count(*) from A
max() to return the largest value.
select count(a),max(c),b from A group by b
min() to return the smallest value.
select count(a),min(c),b from A group by b
sum() to return the sum.
sum() function supports only numeric values.
select A.a, sum(A.b) from A
Limitations of the Aggregate Functions
The aggregate functions have the same limitations as standard SQL aggregate functions.
In addition to specific limitations, you cannot nest aggregate functions.