Skip to main content

approx_distinct

Returns the approximate number of distinct input values. This function provides an approximation of count(DISTINCT x). Zero is returned if all input values are null. Supported Signatures
πŸ”— Official Documentation

approx_most_frequent

Computes the top frequent values up to buckets elements approximately. Approximate estimation of the function enables us to pick up the frequent values with less memory. Larger capacity improves the accuracy of underlying algorithm with sacrificing the memory capacity. The returned value is a map containing the top elements with corresponding estimated frequency. Supported Signatures
πŸ”— Official Documentation

approx_percentile

Returns the approximate percentile for all input values of x at the given percentage. The value of percentage must be between zero and one and must be constant for all input rows. Supported Signatures
πŸ”— Official Documentation

arbitrary

Returns an arbitrary non-null value of x, if one exists. Identical to any_value(). Supported Signatures
πŸ”— Official Documentation

array_agg

Returns an array created from the input x elements. Examples:
examples.sql
Supported Signatures
πŸ”— Official Documentation

avg

Returns the average (arithmetic mean) of all input values. Examples:
examples.sql
Supported Signatures
πŸ”— Official Documentation

bitwise_and_agg

Returns the bitwise AND of all input non-NULL values in 2’s complement representation. If all records inside the group are NULL, or if the group is empty, the function returns NULL. Supported Signatures
πŸ”— Official Documentation

bitwise_or_agg

Returns the bitwise OR of all input non-NULL values in 2’s complement representation. If all records inside the group are NULL, or if the group is empty, the function returns NULL. Supported Signatures
πŸ”— Official Documentation

bool_and

Returns TRUE if every input value is TRUE, otherwise FALSE. Supported Signatures
πŸ”— Official Documentation

bool_or

Returns TRUE if any input value is TRUE, otherwise FALSE. Supported Signatures
πŸ”— Official Documentation

checksum

Returns an order-insensitive checksum of the given values. Supported Signatures
πŸ”— Official Documentation

corr

Returns correlation coefficient of input values. Supported Signatures
πŸ”— Official Documentation

count

Returns the number of input rows. Examples:
examples.sql
Supported Signatures
πŸ”— Official Documentation

count_if

Returns the number of TRUE input values. This function is equivalent to count(CASE WHEN x THEN 1 END). Supported Signatures
πŸ”— Official Documentation

covar_pop

Returns the population covariance of input values. Supported Signatures
πŸ”— Official Documentation

covar_samp

Returns the sample covariance of input values. Supported Signatures
πŸ”— Official Documentation

every

This is an alias for bool_and(). Supported Signatures
πŸ”— Official Documentation

geometric_mean

Returns the geometric mean of all input values. Supported Signatures
πŸ”— Official Documentation

histogram

Returns a map containing the count of the number of times each input value occurs. Supported Signatures
πŸ”— Official Documentation

kurtosis

Returns the excess kurtosis of all input values. Unbiased estimate using the following expression. Supported Signatures
πŸ”— Official Documentation

listagg

Returns the concatenated input values, separated by the separator string. Supported Signatures
πŸ”— Official Documentation

map_agg

Returns a map created from the input key / value pairs. Supported Signatures
πŸ”— Official Documentation

map_union

Returns the union of all the input maps. If a key is found in multiple input maps, that key’s value in the resulting map comes from an arbitrary input map. Supported Signatures
πŸ”— Official Documentation

max

Returns the maximum value of all input values. Supported Signatures
πŸ”— Official Documentation

max_by

Returns the value of x associated with the maximum value of y over all input values. Supported Signatures
πŸ”— Official Documentation

min

Returns the minimum value of all input values. Supported Signatures
πŸ”— Official Documentation

min_by

Returns the value of x associated with the minimum value of y over all input values. Supported Signatures
πŸ”— Official Documentation

multimap_agg

Returns a multimap created from the input key / value pairs. Each key can be associated with multiple values. Supported Signatures
πŸ”— Official Documentation

numeric_histogram

Computes an approximate histogram with up to buckets number of buckets for all values with a per-item weight of weight. The algorithm is based loosely on. Supported Signatures
πŸ”— Official Documentation

regr_intercept

Returns linear regression intercept of input values. y is the dependent value. x is the independent value. Supported Signatures
πŸ”— Official Documentation

regr_slope

Returns linear regression slope of input values. y is the dependent value. x is the independent value. Supported Signatures
πŸ”— Official Documentation

skewness

Returns the Fisher’s moment coefficient of skewness of all input values. Supported Signatures
πŸ”— Official Documentation

stddev

This is an alias for stddev_samp(). Supported Signatures
πŸ”— Official Documentation

stddev_pop

Returns the population standard deviation of all input values. Examples:
examples.sql
Supported Signatures
πŸ”— Official Documentation

stddev_samp

Returns the sample standard deviation of all input values. Examples:
examples.sql
Supported Signatures
πŸ”— Official Documentation

sum

Returns the sum of all input values. Examples:
examples.sql
Supported Signatures
πŸ”— Official Documentation

var_pop

Returns the population variance of all input values. Supported Signatures
πŸ”— Official Documentation

var_samp

Returns the sample variance of all input values. Supported Signatures
πŸ”— Official Documentation

variance

This is an alias for var_samp(). Supported Signatures
πŸ”— Official Documentation