OPAL Aggregate FunctionsΒΆ
Aggregate functions are used with aggregating verbs like
timechart
, aggregate
, and
statsby
.
Aggregate functions accept multiple input values from a set of input rows and emit
one output value as a single output row. For example, sum
calculates the
sum of all input numbers, and max
returns the largest value.
Function |
Description |
---|---|
Return any value of one column across a group |
|
Return any non-null value of one column across a group. |
|
Returns an array of concatenated input values. |
|
Returns an array of distinct input values. |
|
Calculate the arithmetic average of the input expression across the group. |
|
Count the number of non-null items in the group. |
|
Estimate the approximate number of distinct values in the input using hyper-log-log. |
|
Count the exact number of distinct values in the input using complete enumeration (slower than [count_distinct](. |
|
Calculate the average per-second derivative of the argument across the group. |
|
Return the first value of one column across an ordered group. |
|
Return the first non-null value of one column across an ordered group. |
|
Return the last value of one column across an ordered group. |
|
Return the last non-null value of one column across an ordered group. |
|
Compute the maximum of one column across a group (with one argument) or the scalar greatest value of its arguments (with more than |
|
Return the fast approximate median value of one column. |
|
Return the exact median value of one column. |
|
Compute the minimum of one column across a group (with one argument) or the scalar least value of its arguments (with more than |
|
Returns one OBJECT per group. |
|
Returns an approximated value for the specified percentile of the input expression across the group. |
|
Assuming a continuous distribution, it returns the value for the specified percentile of the input expression across the group. |
|
Assuming a discrete distribution, it returns the value for the specified percentile of the input expression across the group. |
|
prom_quantile calculates an approximate percentile value based on the distribution in a histogram metric that was generated by a |
|
Calculate the average per-second rate of the argument across the group. |
|
Calculate the standard deviation across the group. |
|
Returns concatenated input values, separated by the delimiter. |
|
Returns concatenated input values, separated by the delimiter. |
|
Calculate the sum of the argument across the group, or of the scalar arguments if more than one. |