# 执行顺序
select
...
from
...
where
...
group by
...
having
...
order by
...
执行顺序:
1. from
2. where
3. group by
4. having
5. select
6. order by
从某张表查询数据,
先经过 where 条件筛选出有价值的数据,
对这些数据进行分组,
分组后可以使用 having 继续筛选数据
select 查询出来
最后排序输出