Statistical Functions

Uncategorized additional functions supported by e6data

STDDEV( expression )

Returns the sample standard deviation, within the input group of values.

select stddev(colB) from table1

STDDEV_POP( expression )

Returns the population standard deviation, which is the square root of the population variance, from the input group of values.

select stddev_pop(colB) from table1

PERCENTILE_CONT( <percentile> ) WITHIN GROUP (ORDER BY <expression> [ ASC | DESC ] )

Returns the linear interpolated value that would fall into the given <percentile> value with respect to the specified sort direction.

select percentile_cont(0.5) within group1 (order by colA asc) from table1

APPROX_QUANTILES( <expr>, number )

select approx_quantiles(colA, 4)

Returns the approximate boundaries for a group of <expr>values, where number represents the number of quantiles to create. This function returns an array of number + 1 element, where the first element is the approximate minimum and the last element is the approximate maximum.

Last updated