Waiting for SQL:202y: Group by All

SQL adds auto-grouping; fans cheer while alias wars erupt

TLDR: The next SQL standard will include “GROUP BY ALL” to auto-group non-summarized columns. Commenters celebrate the convenience but demand alias support and warn about hidden gotchas, while Snowflake/DuckDB users brag they’ve had it—big news for fewer mistakes and faster data wrangling.

SQL—the language behind most databases—is lining up a new trick: GROUP BY ALL, a shortcut that auto-groups all the non-summarized bits in your query. The standards committee gave it a green light in September, and it’s already in places like Databricks, BigQuery, Snowflake, and DuckDB. Sounds simple, right? Cue the comment section chaos.

The loudest take: people don’t just want auto-grouping, they want aliases—nicknames for columns—to be usable while grouping. One user, clearly at the end of their rope, yelled: “reference the damn alias… F.” Another begged for the holy grail: “Let me reference fields as I create them,” like building Lego blocks that know each other from step one. Snowflake fans swaggered in with “we’ve had this” energy: once you use it, going back is “painful.” Meanwhile, pragmatists warned this convenience can backfire, like the notorious “SELECT *” surprise—change one thing up top, and your groupings shift under your feet. The standard still dodges messy cases (like math plus averages in the same line), leaving humans to spell out exactly what they mean. In short: the crowd is thrilled, grumpy, and funny—classic dev theater with real stakes for anyone who hates repetitive, error-prone queries.

Key Points

  • GROUP BY ALL is a proposed SQL standard feature that expands to non-aggregate select-list elements to simplify GROUP BY clauses.
  • The SQL standard working group reached consensus in June 2025 and accepted a formal change proposal as a working draft in September 2025.
  • Existing implementations in Databricks, DuckDB, BigQuery, and Snowflake already support GROUP BY ALL.
  • Complex expressions combining aggregates and non-aggregates are intentionally not inferred by GROUP BY ALL and require explicit grouping.
  • The current SQL standard does not allow expressions in GROUP BY; changes are intended, with additional detail needed for cases like UDFs and subqueries.

Hottest takes

"reference the damn alias in a group by, FUCK" — Exuma
"Let me reference fields as I create them" — elygre
"Once you start using it, it's painful to go back" — cm2187
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.