Aggregate Functions

Function Return Type Description
AVG([number] x) Double Returns the average value of x.
"CORR"([number] x, [number] y) Double Calculates the covariance of the values in x and y. Function name must be enclosed in double quotes.
COUNT(*) BIGINT Gives the total number of records.
COUNT(DISTINCT [field name] givenfield) BIGINT Returns the number of distinct values in the field named givenfield.
COUNT(DISTINCT [field name] givenfield, [optional field name] givenfield2, [optional field name] givenfield3, ...) BIGINT Returns the number of distinct values. If one field is specified, then the number of distinct values in that field. If more than one field is specified, then the number of distinct combinations of values in the the specified fields.
MAX([number] x) Same as input Returns the maximum value of x.
MAX([timetype] giventime) Same as input Returns the latest value of giventime.
MIN([number] x) Same as input Returns the minimum value of x.
MIN([timetype] giventime) Same as input Returns the earliest value of giventime.
NDV([field name] givenfield) BIGINT Fast and memory efficient approximate COUNT(DISTINCT) alternative using HyperLogLog.
STDDEV_POP([number] x) Double Takes the population standard deviation of values of x.
STDDEV([number] x) Double Takes the sample standard deviation of values of x.
SUM([number] x) Same as input Returns the sum of values of x.
SUM([timeinterval] giveninterval) Same as input Returns the sum of values of giveninterval.
VAR_POP([number] x) Double Takes the population variance of values of x.
VARIANCE([number] x) Double Takes the sample variance of values of x.

results matching ""

    No results matching ""