OPAL Window 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…

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…

dense_rank

Returns the dense rank within an ordered group of…

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…

lag

Return the lag of one column across an ordered…

last

Return the last value of one column across an…

last_not_null

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

lead

Return the lead of one column across an ordered…

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…

rank

Returns the rank within an ordered group of values….

rate

Calculate the average per-second rate of the…

row_number

Return the window index of the row within its…

stddev

Calculate the standard deviation across the group.

sum

Calculate the sum of the argument across the group,…