v.19.8New Features

Added Functions Skewpop, Skewsamp, Kurtpop and Kurtsamp to Compute for Sequence Skewness, Sample Skewness, Kurtosis and Sample Kurtosis Respectively

Added functions skewPop, skewSamp, kurtPop and kurtSamp to compute for sequence skewness, sample skewness, kurtosis and sample kurtosis respectively. #5200 (hcz)
Added new aggregate functions skewPop, skewSamp, kurtPop, and kurtSamp to compute population skewness, sample skewness, population kurtosis, and sample kurtosis respectively for data sequences.

Why it matters

These functions provide statistical measures to analyze the asymmetry (skewness) and the tailedness (kurtosis) of data distributions within ClickHouse. This enables users to perform more advanced statistical analysis directly within the database, improving insights into their datasets without needing external tools.

How to use it

Use the new functions as aggregate functions in your queries on numeric columns. For example:

SELECT skewPop(column), skewSamp(column), kurtPop(column), kurtSamp(column) FROM table


where column is the column you want to analyze.