(5) select (5-2) distinct (5-3) top (<top_specification>) (5-1) <select_list>
(1) from (1-j) <left_table> <join_type> join <right_table> on <on_predicate>
|(1-a) <left_table> <apply_type> apply <right_table_expression> as <alias>
|(1-p) <left_table> pivot (<pivot_specification>) as <alias>
|(1-u) <left_table> unpivot (<unpivot_specification>) as <alias>
(2) where <where_predicate>
(3) group by <group_by_specification>
(4) having <having_predicate>
(6) order by <order_by_list>