- Categories:
Aggregate functions (General) , Window function syntax and usage
KURTOSIS¶
Returns 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:
ndenotes the number of non-NULL records.m_4denotes the sample fourth central moment.k_2denotes the symmetric unbiased estimator of the variance.
Syntax¶
Aggregate function
Window function
Arguments¶
exprAn expression that evaluates to a numeric data type (such as INTEGER, FLOAT, DECIMAL).
expr2An 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.
Examples¶
Create a table and insert some rows:
Select all the data from the table:
Return the KURTOSIS value for each column: