Numeric Aggregate Functions
A list of available functions to perform numeric aggregate calculations
Functions
Section titled “Functions”correlation(x:y:)
Section titled “correlation(x:y:)”Calculates the correlation coefficient between two numeric columns.
correlation(x: DOUBLE, y: DOUBLE) -> DOUBLEpopulation_covariance(x:y:)
Section titled “population_covariance(x:y:)”Calculates the population covariance between two numeric columns.
population_covariance(x: DOUBLE, y: DOUBLE) -> DOUBLEsample_covariance(x:y:)
Section titled “sample_covariance(x:y:)”Calculates the sample covariance between two numeric columns.
sample_covariance(x: DOUBLE, y: DOUBLE) -> DOUBLEkurtosis(x:)
Section titled “kurtosis(x:)”The excess kurtosis (Fisher’s definition) with bias correction according to the sample size.
kurtosis(x: DOUBLE) -> DOUBLEpopulation_standard_deviation(arg:)
Section titled “population_standard_deviation(arg:)”Calculates the population standard deviation of the input values.
population_standard_deviation(arg: DOUBLE) -> DOUBLEsample_standard_deviation(arg:)
Section titled “sample_standard_deviation(arg:)”Calculates the sample standard deviation of the input values.
sample_standard_deviation(arg: DOUBLE) -> DOUBLEpopulation_variance(arg:)
Section titled “population_variance(arg:)”Calculates the population variance of the input values.
population_variance(arg: DOUBLE) -> DOUBLEsample_variance(arg:)
Section titled “sample_variance(arg:)”Calculates the sample variance of the input values.
sample_variance(arg: DOUBLE) -> DOUBLEaverage(arg:)
Section titled “average(arg:)”Calculates the average of all non-null values in arg.
average(arg: DOUBLE) -> DOUBLEgeometric_mean(arg:)
Section titled “geometric_mean(arg:)”Calculates the geometric mean of all non-null values in arg.
geometric_mean(arg: DOUBLE) -> DOUBLEmax(arg:)
Section titled “max(arg:)”Returns the maximum value present in arg.
max(arg: DOUBLE) -> DOUBLEmin(arg:)
Section titled “min(arg:)”Returns the minimum value present in arg.
min(arg: DOUBLE) -> DOUBLEsum(arg:)
Section titled “sum(arg:)”Calculates the sum of all non-null values in arg.
sum(arg: DOUBLE) -> DOUBLEproduct(arg:)
Section titled “product(arg:)”Calculates the product of all non-null values in arg.
product(arg: DOUBLE) -> DOUBLEcount(arg:)
Section titled “count(arg:)”Returns the number of non-null values in arg.
count(arg: DOUBLE) -> BIGINTapprox_quantile(arg:quantile:)
Section titled “approx_quantile(arg:quantile:)”Returns the approximate quantile value for the given quantile (0.0 to 1.0) from arg.
approx_quantile(arg: DOUBLE, quantile: DOUBLE) -> DOUBLE