I'd like to do
SELECT column1 + column2 as add_of_two_columns
, add_of_two_columns + column3 as another_add_of_two_columns
FROM table1
ORDER BY (add_of_two_columns * 2) / another_add_of_two_columns;
Unfortunately, I get errors in my SELECT clause and in my ORDER clause that columns (my aliases) don't exist.
How can I make this work?