KURTOSIS
functionsupportedCore SQL functionsReturns the sample excess kurtosis of non-NULL records. If all records inside a group are NULL, the function returns NULL. The following formula is used to compute the sample excess kurtosis: (n * (n+1))/((n-1) * (n-2) * (n-3)) * (n * m_4/(k_2)^2) - 3 * (n-1)^2 / ((n-2) * (n-3))where: - n denotes the number of non-NULL records. - m_4 denotes the sample fourth central moment. - k_2 denotes the symmetric unbiased estimator of the variance.
Syntax
supportedpartialnot supportednot scored
Aggregate function
KURTOSIS( <expr> )
Window function
KURTOSIS( <expr> ) OVER ( [ PARTITION BY <expr2> ] )
Parameters
| Name | Required | Description |
|---|---|---|
expr | required | An expression that evaluates to a numeric data type (such as INTEGER, FLOAT, DECIMAL). |
expr2 | required | An expression that defines the individual groups or windows. |
Returns
Returns DOUBLE if the input data type is DOUBLE/FLOAT. Returns DECIMAL if the input data type is another numeric data type.
Usage notes
- For inputs with fewer than four records, KURTOSIS returns NULL.
- When this function is called as a window function, it does not support: An ORDER BY clause within the OVER clause.
- Explicit window frames.