v.21.1New Features
Added arrayMin, arrayMax, arrayAvg aggregation functions
AddedarrayMin,arrayMax,arrayAvgaggregation functions. #18032 (Maksim Kita).
Why it matters
These functions provide the ability to calculate the minimum, maximum, and average values within arrays during aggregation, simplifying array data analysis and enabling more expressive queries on array columns.How to use it
Use these functions in aggregation queries by applyingarrayMin, arrayMax, or arrayAvg to an array column within the SELECT statement, for example:SELECT arrayMin(array_column), arrayMax(array_column), arrayAvg(array_column)
FROM table
GROUP BY some_column