v.20.5Performance Improvement
Optimization for Removing Aggregators in GROUP BY Keys using optimize_aggregators_of_group_by_keys Setting
Optimization that eliminates min/max/any aggregators of GROUP BY keys in SELECT section, enabled with optimize_aggregators_of_group_by_keys setting. #11667 (xPoSx). #11806 (Azat Khuzhin).