v.20.9New Feature
Added rankCorr Aggregate Function for Rank Correlation Coefficient
Added an aggregate function rankCorr which computes a rank correlation coefficient. #11769 (antikvist) #14411 (Nikita Mikhaylov).Why it matters
TherankCorr function provides a statistical measure of the relationship between two variables based on their ranks. It helps users to understand the strength and direction of association in their data without assuming a linear relationship, which is valuable for non-parametric correlation analysis directly within ClickHouse queries.How to use it
Use therankCorr function in an aggregate context by passing two columns or expressions to it, for example:SELECT rankCorr(column1, column2) FROM table_name;