规则顺序
select - from - where - group by - having - order by - limit
where 对分组前的记录条件查询,并且不能含有聚合函数
having 对分组后的记录条件查询,可以使用聚合函数
执行顺序
from - where - groupby -having - select - order by - limit
规则顺序
select - from - where - group by - having - order by - limit
where 对分组前的记录条件查询,并且不能含有聚合函数
having 对分组后的记录条件查询,可以使用聚合函数
执行顺序
from - where - groupby -having - select - order by - limit