sql书写与执行顺序
(8) SELECT (9)DISTINCT<Select_list>
(1) FROM <left_table>
(3) <join_type>JOIN<right_table> (2) ON<join_condition>
(4) WHERE<where_condition>
(5) GROUP BY<group_by_list>
(6) WITH {CUBE|ROLLUP}
(7) HAVING<having_condtion>
(10) ORDER BY<order_by_list>
(11) LIMIT<limit_number>