OPAL Aggregate Functions

Function

Description

any

Return any value of one column across a group

any_not_null

Return any non-null value of one column across a…

array_agg

Returns an array of concatenated input values. The…

avg

Calculate the arithmetic average of the input…

count

Count the number of non-null items in the group.

count_distinct

Estimate the approximate number of distinct values…

count_distinct_exact

Count the exact number of distinct values in the…

deriv

Calculate the average per-second derivative of the…

first

Return the first value of one column across an…

first_not_null

Return the first non-null value of one column across…

last

Return the last value of one column across an…

last_not_null

Return the last non-null value of one column across…

max

Compute the maximum of one column across a group…

median

Return the fast approximate median value of one…

median_exact

Return the exact median value of one column.

min

Compute the minimum of one column across a group…

object_agg

Returns one OBJECT per group. For each (key, value)…

percentile

Returns an approximated value for the specified…

percentile_cont

Assuming a continuous distribution, it returns the…

percentile_disc

Assuming a discrete distribution, it returns the…

rate

Calculate the average per-second rate of the…

stddev

Calculate the standard deviation across the group.

string_agg

Returns concatenated input values, separated by the…

sum

Calculate the sum of the argument across the group,…