v.22.12New Feature

Add GROUP BY ALL Syntax Support

Add GROUP BY ALL syntax: #37631. #42265 (刘陶峰).
Added support for the GROUP BY ALL syntax in ClickHouse.

Why it matters

The GROUP BY ALL feature allows users to perform grouping without filtering out any rows, including those with NULL values. This solves the problem of missing groups in aggregation results when using standard GROUP BY, providing more comprehensive and accurate aggregation outputs.

How to use it

Use the new syntax by adding GROUP BY ALL in your SQL query. For example:

SELECT column1, count(*)
FROM table
GROUP BY ALL column1;