Skip to content
Blog

Aggregate Functions

FunctionDescriptionExample
avg(arg)returns the average value of all tuples in argavg(a.length)
count(arg)returns the number of tuples in argcount(a.ID)
min(arg)returns the minimum value of argmin(a.length)
max(arg)returns the maximum value of argmax(a.length)
sum(arg)returns the sum value of all tuples in argsum(a.length)
collect(arg)returns a list of values returned by arg expressioncollect(a.age)
percentileDisc(arg, percentile)returns the value that corresponds to the given discrete percentile of the input values; percentile must be a literal between 0.0 and 1.0percentileDisc(a.age, 0.5)