Aggregate Functions
any_value
Returns the first non-null value of a column Supported Signatures
approx_count_distinct
approximate distinct row count Supported Signatures
approx_percentile
percentile approximation of inputs Supported Signatures
approx_percentile_accumulate
tdigest state in JSON format Supported Signatures
approx_percentile_combine
A tdigest state in JSON format Supported Signatures
approx_percentile_estimate
ESTIMATED PERCENTILE VALUE Supported Signatures
approx_top_k
Array containing top k items and their frequencies Supported Signatures
approx_top_k_accumulate
An internal state Supported Signatures
approx_top_k_combine
A state created by combining information from combining all input Supported Signatures
approx_top_k_estimate
Array containing most common k items and their frequencies Supported Signatures
approximate_jaccard_index
Similarity approximation of inputs Supported Signatures
approximate_similarity
Similarity approximation of inputs Supported Signatures
array_agg
output array Supported Signatures
array_union_agg
output array Supported Signatures
array_unique_agg
output array Supported Signatures
avg
Returns the average of the values in a group. Null values are ignored. Supported Signatures
bitand_agg
Returns the bitwise AND of a column. Null values are ignored. Supported Signatures
bitmap_bit_position
relative position in bitmap Supported Signatures
bitmap_bucket_number
bucket index of the destination bitmap Supported Signatures
bitmap_construct_agg
bitmap Supported Signatures
bitmap_count
number of set bits in the bitmap Supported Signatures
bitmap_or_agg
destination bitmap Supported Signatures
bitor_agg
Returns the bitwise OR of a column. Null values are ignored. Supported Signatures
bitxor_agg
Returns the bitwise XOR of a column. Null values are ignored. Supported Signatures
booland_agg
Returns the logical (boolean) AND of a column. Null values are ignored. Supported Signatures
boolor_agg
Returns the logical (boolean) OR of a column. Null values are ignored. Supported Signatures
boolxor_agg
Returns the logical (boolean) XOR of a column. Null values are ignored. Supported Signatures
corr
Returns the correlation coefficient for non-null pairs in a group. Supported Signatures
count
Return number of non-null values of a given expression Supported Signatures
count_if
Returns a conditional count Supported Signatures
covar_pop
Returns the population covariance for non-null pairs in a group. Supported Signatures
covar_samp
Returns the sample covariance for non-null pairs in a group. Supported Signatures
grouping
Supported Signatures
grouping_id
Returns grouping bit-vector Supported Signatures
hash_agg
aggregate hash value Supported Signatures
hll
approximate distinct row count Supported Signatures
hll_accumulate
HyperLogLog state Supported Signatures
hll_combine
combined HyperLogLog state Supported Signatures
hll_estimate
approximate distinct row count Supported Signatures
hll_export
HyperLogLog state as a compound OBJECT Supported Signatures
hll_import
HyperLogLog state in binary format Supported Signatures
kurtosis
Returns the sample kurtosis of the values in a group. Null values are ignored. Supported Signatures
listagg
output string Supported Signatures
max
Returns the maximum of a column Supported Signatures
max_by
Returns value of first column with maximum second column val Supported Signatures
median
The median of a column Supported Signatures
min
Returns the minimum of a column Supported Signatures
min_by
Returns value of first column with minimum second column val Supported Signatures
minhash
Minhash state including an array of k (first input arg) minimum hash values Supported Signatures
minhash_combine
Combined result of two (or more) minhash states Supported Signatures
mode
Returns the most frequent item of a column Supported Signatures
object_agg
output object Supported Signatures
percentile_cont
value of a sorted key at specified percentile in continuous distribution Supported Signatures
percentile_disc
value of a sorted key at specified percentile in discrete distribution Supported Signatures
regr_avgx
Returns the average of the independent variable (2nd parameter) for non-null pairs. Supported Signatures
regr_avgy
Returns the average of the dependent variable (1st parameter) for non-null pairs. Supported Signatures
regr_count
Returns the number of non-null number pairs. Supported Signatures
regr_intercept
Returns the intercept of the univariate linear regression line for non-null pairs. Supported Signatures
regr_r2
Returns the coefficient of determination for non-null pairs. Supported Signatures
regr_slope
Returns the slope of the linear regression line for non-null pairs. Supported Signatures
regr_sxx
Returns REGR_COUNT(expr1, expr2) * VAR_POP(expr2) for non-null pairs. Supported Signatures
regr_sxy
Returns REGR_COUNT(expr1, expr2) * COVAR_POP(expr1, expr2) for non-null pairs. Supported Signatures
regr_syy
Returns REGR_COUNT(expr1, expr2) * VAR_POP(expr1) for non-null pairs. Supported Signatures
skew
Returns the sample skew of the values in a group. Null values are ignored. Supported Signatures
stddev
Returns the sample standard deviation of the values in a group. Null values are ignored. Supported Signatures
stddev_pop
Returns the population standard deviation of the values in a group. Null values are ignored. Supported Signatures
stddev_samp
Returns the sample standard deviation of the values in a group. Null values are ignored. Supported Signatures
sum
Returns a sum of a column Supported Signatures
var_pop
Returns the population variance of the values in a group. Null values are ignored. Supported Signatures
var_samp
Returns the sample variance of the values in a group. Null values are ignored. Supported Signatures
variance
Returns the sample variance of the values in a group. Null values are ignored. Supported Signatures
variance_pop
Returns the population variance of the values in a group. Null values are ignored. Supported Signatures
variance_samp
Returns the sample variance of the values in a group. Null values are ignored. Supported Signatures