All functions > WINDOW FUNCTION

All functions in the WINDOW FUNCTION category.

Backend availability

DD Available DD Partially available DD Not available DD DuckDB · PG Postgres · CH ClickHouse · TR Trino · BQ BigQuery · SF Snowflake · DB Databricks · SV Serving

Numeric

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

Counting

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

Boolean

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

Numbering

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

Offset

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

Collection

FunctionDescriptionBackends
ANY_VALUE() OVER ...Returns a non-null value of the window frame: the minimum in value order, NULL if there is none.DDPGCHTRBQSFDBSV
ARRAY_AGG() OVER ...Returns an array of all values in the window frame.DDPGCHTRBQSFDBSV
MIN_BY() OVER ...Returns the value of the first expression corresponding to the minimum value of the second...DDPGCHTRBQSFDBSV
MAX_BY() OVER ...Returns the value of the first expression corresponding to the maximum value of the second...DDPGCHTRBQSFDBSV
STRING_AGG() OVER ...Concatenates string values in the window frame in order up to the current row, separated by the...DDPGCHTRBQSFDBSV

Statistical

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

Summary
Functions in this category: 43

This documentation is automatically generated from the FeatureMesh registry.