Skip to content

Latest commit

 

History

History
23 lines (22 loc) · 6.7 KB

File metadata and controls

23 lines (22 loc) · 6.7 KB

Aggregate

Function Name Description
APPROX_COUNT_DISTINCT Returns the approximate number of unique, non-null values in a column.
AVG Computes the average of a set of values.
BIT_AND Returns the bitwise AND of non-NULL input values.
BIT_OR Returns the bitwise OR of non-NULL input values.
CORR Calculates the Pearson correlation coefficient of the values expression1 and expression2. The function name must be enclosed in double quotes (“CORR”).
COUNT Returns the total number of records for the specified expression.
COVAR_POP Returns the population covariance for non-NULL pairs across all input values.
COVAR_SAMP Returns the sample covariance for non-NULL pairs across all input values.
HLL Uses HyperLogLog to return an approximation of the distinct cardinality of the input.
LISTAGG Concatenates a group of rows into a list of strings and places a separator between them.
MAX Returns the maximum value among the non-NULL input expressions.
MIN Returns the minimum value among the non-NULL input expressions.
NDV Returns an approximate distinct value number, similar to COUNT(DISTINCT col). NDV can return results faster than using the combination of COUNT and DISTINCT while using a constant amount of memory, resulting in less memory usage for columns with high cardinality.
STDDEV Returns the standard deviation of non-NULL values in a column with a numeric data type. If all records inside a group are NULL, returns NULL.
STDDEV_POP Returns the population standard deviation (square root of variance) of non-NULL values in a column with a numeric data type. If all records inside a group are NULL, returns NULL.
STDDEV_SAMP Returns the sample standard deviation (square root of sample variance) of non-NULL values in a column with a numeric data type. If all records inside a group are NULL, returns NULL.
SUM Returns the sum of non-NULL input expressions.
VAR_POP Returns the population variance of non-NULL records.
VAR_SAMP Returns the sample variance of non-NULL records.