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. | |
| Returns an array containing the multiset union of input arrays. | |
| Calculate the arithmetic average of the input expression across the group, or of the scalar arguments if more than one. | |
| 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. | |
| Calculates the value difference of the argument in each time bin for each group. | |
| Calculates the amount of difference in a column in each time bin for each group. | |
| 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. | |
| Returns an aggregate signed 64-bit hash value over the (unordered) set of input rows. | |
| Returns an aggregate signed 64-bit hash value over the (unordered) set of distinct input rows. | |
| Return the last value of one column across an ordered group. | |
| Return the last non-null value of one column across an ordered group. | |
| Returns the maximum value of a group of inputs. | |
| Return the fast approximate median value of one column. | |
| Return the exact median value of one column. | |
| Returns the minimum value of a group of inputs. | |
| Extract aggregated fields and values from a group of rows into a new JSON object. | |
| Returns an approximated value for the specified percentile of the input expression across the group. | |
| Assuming a continuous distribution, return the value for the specified percentile of the input expression across the group. | |
| Assuming a discrete distribution, return the value for the specified percentile of the input expression across the group. | |
| Calculates an approximate percentile value of the distribution in a histogram metric generated by a Prometheus data source. | |
| 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. | |
| Generate a single t-digest state out of an arbitrary number of numeric values. | |
| Combine (merge) multiple t-digest values together This function is purely an aggregate function. | |
| Returns an approximation of the top K most frequent values in the input, along with their approximate frequencies. |