I’m not sure the sub query would be necessary if the weird ast-based naming didn’t exist. Couldn’t you just write:
SELECT a+1 AS a1 FROM t GROUP BY a1
? SELECT a+1 AS a1 FROM t GROUP BY a1
?[0]: https://www.postgresql.org/message-id/7608.1259177709%40sss....