- 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:
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¶
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: