mysql写的顺序
select....from....group by....having.....order by.....limit
mysql执行顺序
from....on.....join....where....group by.....having....select......distinct.....order by.....limit
hive书写顺序
select....from....group by....having.....order by.....limit
hive执行顺序
from....on.....join....where.....select....group by.....having.....limit