Ben Chuanlong Du's Blog

It is never too late to learn.

Use Column Alias in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Logically any SELECT is processed in following order:

    1. from
    2. where
    3. group by
    4. having
    5. olap functions
    6. qualify
    7. select
    8. sample
    9. order by

    Besides the proprietary QUALIFY/SAMPLE every DBMS will do it exactly …