v.21.1New Features
Added Statistical Aggregate Functions and Refactored Rank Correlation
AddedmannWitneyUTest,studentTTestandwelchTTestaggregate functions. RefactoredrankCorra bit. #16883 (Nikita Mikhaylov).
Why it matters
These new aggregate functions provide users with built-in capabilities to perform common statistical tests within ClickHouse, enabling more advanced data analysis and inference directly in SQL queries without needing external tools.How to use it
Use the new aggregate functions in your queries like any other aggregate function. For example, to perform a Mann-Whitney U test, use:SELECT mannWitneyUTest(column1, column2) FROM table_nameSimilarly, use
studentTTest and welchTTest for their respective tests applied to your dataset columns.