All functions > WINDOW FUNCTION

All functions in the WINDOW FUNCTION category.

Numeric

FunctionDuckDBTrinoServingDescription
SUM() OVER ...✓✓✓Returns the sum of values in the window frame.
AVG() OVER ...✓✓✓Returns the average of values in the window frame.
MIN() OVER ...✓✓✓Returns the minimum value in the window frame.
MAX() OVER ...✓✓✓Returns the maximum value in the window frame.
PRODUCT() OVER ...✓✗✗Returns the product of values in the window frame.
BIT_AND() OVER ...✓✗✗Returns the bitwise AND of integer values in the window frame.
BIT_OR() OVER ...✓✗✗Returns the bitwise OR of integer values in the window frame.
BIT_XOR() OVER ...✓✗✗Returns the bitwise XOR of integer values in the window frame.

Counting

FunctionDuckDBTrinoServingDescription
COUNT() OVER ...✓✓✓Returns the count of rows in the window frame.
COUNT_IF() OVER ...✓✓✓Returns the count of rows where the condition is true in the window frame.
APPROX_DISTINCT() OVER ...✓✓✓Returns the approximate number of distinct values in the window frame.

Boolean

FunctionDuckDBTrinoServingDescription
BOOL_AND() OVER ...✓✓✓Returns TRUE if all boolean values in the window frame are true.
BOOL_OR() OVER ...✓✓✓Returns TRUE if any boolean value in the window frame is true.

Numbering

FunctionDuckDBTrinoServingDescription
ROW_NUMBER() OVER ...✓✓✓Returns a unique sequential number for each row within its partition, starting at 1.
RANK() OVER ...✓✓✓Returns the rank of the current row within its partition, with gaps. Rows with equal values for the...
DENSE_RANK() OVER ...✓✓✓Returns the rank of the current row within its partition, without gaps. Similar to RANK but...
NTILE() OVER ...✓✓✓Returns the bucket number (1 to n) for each row in a partition, where n is the number of buckets.
PERCENT_RANK() OVER ...✓✓✓Returns the relative rank of the current row: (rank - 1) / (total rows - 1).
CUME_DIST() OVER ...✓✓✓Returns the cumulative distribution: (number of rows <= current row) / (total rows).

Offset

FunctionDuckDBTrinoServingDescription
LEAD() OVER ...✓✓✓Returns the value from the row that leads (follows) the current row by a specified offset within...
LAG() OVER ...✓✓✓Returns the value from the row that lags (precedes) the current row by a specified offset within...
FIRST_VALUE() OVER ...✓✓✓Returns the first value in the window frame.
LAST_VALUE() OVER ...✓✓✓Returns the last value in the window frame.
NTH_VALUE() OVER ...✓✓✓Returns the value at the nth row of the window frame.

Collection

FunctionDuckDBTrinoServingDescription
ANY_VALUE() OVER ...✓✓✓Returns an arbitrary non-null value from the window frame, if one exists.
ARRAY_AGG() OVER ...✓✓✓Returns an array of all values in the window frame.
MIN_BY() OVER ...✓✓✗Returns the value of the first expression corresponding to the minimum value of the second...
MAX_BY() OVER ...✓✓✗Returns the value of the first expression corresponding to the maximum value of the second...
STRING_AGG() OVER ...✓✗✗Concatenates string values in the window frame in order up to the current row, separated by the...

Statistical

FunctionDuckDBTrinoServingDescription
STDDEV_POP() OVER ...✓✓✓Returns the population standard deviation over the window frame.
STDDEV_SAMP() OVER ...✓✓✓Returns the sample standard deviation over the window frame.
VAR_POP() OVER ...✓✓✓Returns the population variance over the window frame.
VAR_SAMP() OVER ...✓✓✓Returns the sample variance over the window frame.
CORR() OVER ...✓✓✓Returns the Pearson correlation coefficient over the window frame.
COVAR_POP() OVER ...✓✓✓Returns the population covariance over the window frame.
APPROX_PERCENTILE() OVER ...✓✓✓Returns the approximate value at the given percentile in the window frame.
MEDIAN() OVER ...✓✗✗Returns the median of values in the window frame as DOUBLE.
QUANTILE_CONT() OVER ...✓✗✗Returns the continuous quantile of the window at the given probability; result type is DOUBLE.
QUANTILE_DISC() OVER ...✓✗✗Returns the discrete quantile of the window at the given probability; result type matches the value...
COVAR_SAMP() OVER ...✓✓✓Returns the sample covariance over the window frame.
REGR_SLOPE() OVER ...✓✓✓Returns the slope of the linear regression line over the window frame.
REGR_INTERCEPT() OVER ...✓✓✓Returns the y-intercept of the linear regression line over the window frame.
REGR_R2() OVER ...✓✓✓Returns the coefficient of determination (R²) over the window frame.

Summary
Functions in this category: 43

This documentation is automatically generated from the FeatureMesh registry.