select 分组函数,列(要求出现在group by的后面)
from 表
where原始表的筛选
group by (可按函数分组、多个字段(两者必须都符合)
having用于查询表后的筛选
order by