<< Click to Display Table of Contents >> Aggregation |
Functions |
Syntax |
Instructions |
Examples |
---|---|---|---|
approximateCount |
approximateCount(expression) |
Using HyperLogLog counting (cardinality estimation algorithm for big data, error 3%), returns the number of different values for a set of data |
For example: approximateCount(col['sales']) |
avg |
avg(expression) |
returns the average of a set of data. avg can only be used with numeric fields. null values are ignored |
For example: avg(col["profit"]) |
count |
count(expression) |
Returns the number of data in a set of data. Null values are not counted |
For example: count(col ['product']) |
correlation |
correlation(expression , expression) |
Returns the correlation coefficient of a set of data |
For example: correlation(col ['sales'], col ['profit']) |
countAll |
countAll(expression) |
Returns a count of a set of data, including a count of null values |
For example: countAll(col['sales']) |
covariance |
covariance(expression) |
Returns the covariance of a set of data |
For example: covariance(col['sales'], col['profit']) |
distinctCount |
distinctCount(expression) |
Returns the number of distinct values in a set of data. Null values are not counted |
For example: distinctCount(col['product']) |
max |
max(expression) |
Returns the largest value in a set of data |
For example: max(col['date']) |
median |
median(expression) |
Returns the median of a set of data |
For example: median(col['sales']) |
min |
min(expression) |
Returns the minimum value of a set of data |
For example: min(col['sales']) |
mode |
mode(expression) |
Returns the mode in a set of data |
For example: mode(col['sales']) |
populationStandardDeviation |
populationStandardDeviation(expression) |
Returns the population standard deviation of a set of data |
For example: populationStandardDeviation(col['sales']) |
populationVariance |
populationVariance(expression) |
Returns the population variance of a set of data |
For example: populationVariance(col['sales']) |
Product |
Product(expression) |
Returns the product of a set of data |
For example: Product(col['sales']) |
pthPercentile |
pthPercentile(expression , number) |
Returns the P-percent value point in the numeric range |
For example: pthPercentile(col['sales'], 10) |
quartile |
quartile(expression , 4) |
Returns the quartile of a set of data |
For example: quartile(col['sales'], 4) |
range |
range(expression) |
Returns the range of a set of data |
For example: range(col['sales']) |
standardDeviation |
standardDeviation(expression) |
Returns the standard deviation of a set of data |
For example: standardDeviation(col['sales']) |
standardError |
standardError(expression) |
Returns the standard error of a set of data |
For example: standardError(col['sales']) |
sum |
sum(expression) |
Returns the sum of all data in a set of data |
For example: sum(col['sales']) |
sumSQ |
sumSQ(expression) |
Returns the sum of squares of a set of data |
For example: sumSQ(col['sales']) |
sumWT |
sumWT(expression 1 , expression 2) |
Returns the sum of the weights of the data |
For example: sumWT(col['sales'], col['profit']) |
variance |
variance(expression) |
Returns the variance of a set of data |
For example: variance(col['sales']) |
weightAvg |
weightAvg(expression 1 , expression 2) |
Returns the mean of the weight of the data |
For example: weightAvg(col['sales'], col['profit']) |