Some DBMS can reference columns in ORDER BY and GROUP BY by their sequential numbers. ORDER BY is supported in all the dialects except for Cassandra, ClickHouse, Hive, Spark, and HSQLDB. GROUP BY is supported in MySQL, Maria, PostgreSQL (and its subdialects), Exasol, SQLite, and Snowflake.