书写顺序:

select

from

where

group by

having

order by


执行顺序:

from

where

group by

select

having

order by