Some do. It would also be nice to reference by ordinal number similar to order by. Very handy for quick and dirty queries. I can see the issue though that people start to lean on it too much.
The problem with this and similar requests is that it would change the identifier scoping in incompatible ways and therefore potentially break a lot of existing SQL code.
At least in PostgreSQL, both by alias and ordinal are possible:
Some do. It would also be nice to reference by ordinal number similar to order by. Very handy for quick and dirty queries. I can see the issue though that people start to lean on it too much.
The problem with this and similar requests is that it would change the identifier scoping in incompatible ways and therefore potentially break a lot of existing SQL code.
I think it should be not only in GROUP BY, but in every context, e.g., inside expressions in SELECT, WHERE, etc.
PostgreSQL and DuckDB support this, which makes MSSQL feel like a dinosaur in context.