This section explains how to use and combine different aggregation functions in APL.
Function | Description |
---|---|
arg_min | Returns the row where an expression evaluates to the minimum value. |
arg_max | Returns the row where an expression evaluates to the maximum value. |
avg | Returns an average value across the group. |
avgif | Calculates the average value of an expression in records for which the predicate evaluates to true. |
count | Returns a count of the group without/with a predicate. |
countif | Returns a count of rows for which the predicate evaluates to true. |
dcount | Returns an estimate for the number of distinct values that are taken by a scalar an expressionession in the summary group. |
dcountif | Returns an estimate of the number of distinct values of an expression of rows for which the predicate evaluates to true. |
histogram | Returns a timeseries heatmap chart across the group. |
make_list | Creates a dynamic JSON object (array) of all the values of an expression in the group. |
make_list_if | Creates a dynamic JSON object (array) of an expression values in the group for which the predicate evaluates to true. |
make_set | Creates a dynamic JSON array of the set of distinct values that an expression takes in the group. |
make_set_if | Creates a dynamic JSON object (array) of the set of distinct values that an expression takes in records for which the predicate evaluates to true. |
max | Returns the maximum value across the group. |
maxif | Calculates the maximum value of an expression in records for which the predicate evaluates to true. |
min | Returns the minimum value across the group. |
minif | Returns the minimum of an expression in records for which the predicate evaluates to true. |
percentile | Calculates the requested percentiles of the group and produces a timeseries chart. |
percentileif | Calculates the requested percentiles of the field for the rows where the predicate evaluates to true. |
percentiles_array | Returns an array of numbers where each element is the value at the corresponding percentile. |
percentiles_arrayif | Returns an array of percentile values for the records that satisfy the condition. |
rate | Calculates the rate of values in a group per second. |
stdev | Calculates the standard deviation of an expression across the group. |
stdevif | Calculates the standard deviation of an expression in records for which the predicate evaluates to true. |
sum | Calculates the sum of an expression across the group. |
sumif | Calculates the sum of an expression in records for which the predicate evaluates to true. |
topk | Calculates the top values of an expression across the group in a dataset. |
topkif | Calculates the top values of an expression in records for which the predicate evaluates to true. |
variance | Calculates the variance of an expression across the group. |
varianceif | Calculates the variance of an expression in records for which the predicate evaluates to true. |