kurtosis
aggregate function
Applies to: Databricks SQL Databricks Runtime
Returns the kurtosis value calculated from values of a group.
Arguments
expr
: An expression that evaluates to a numeric.cond
: An optional boolean expression filtering the rows used for aggregation.
Returns
A DOUBLE.
If DISTINCT
is specified the function operates only on a unique set of expr
values.
Examples
> SELECT kurtosis(col) FROM VALUES (-10), (-20), (100), (100), (1000) AS tab(col);
0.16212458373485106
> SELECT kurtosis(DISTINCT col) FROM VALUES (-10), (-20), (100), (100), (1000) AS tab(col);
-0.7014368047529627
> SELECT kurtosis(col) FROM VALUES (1), (10), (100), (10), (1) as tab(col);
0.19432323191699075