Aggregate

Function Name Description
APPROX_COUNT_DISTINCT Returns the approximate number of rows that contain distinct values in a column. Ignores rows that contain a null value for the column.
AVG Computes the average of a set of values.
CORR Calculates the covariance 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.
HLL Uses HyperLogLog to return an approximation of the distint cardinality of the input.
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.
PIVOT Converts a set of data from rows into columns
SUM Returns the sum of non-NULL input expressions.
UNPIVOT Converts a set of data from columns into rows
VAR_POP Returns the population variance of non-NULL records.
VAR_SAMP Returns the sample variance of non-NULL records.