执行顺序
-
from
-
on
-
join/pivot/unpivot(mysql没有pivot和unpivot)
-
where
-
group by
-
having
-
select
-
distinct
-
order by
- limit(oralce没有)
书写顺序
select distinct <select_list> from <left_table> <join_type>join <right_table> on <join_condition> where <where_condition> group by <group_by_list> having <having_condition> order by <order_by_list> limit