where,group by,having,order by,一句话搞定他们之间的关系
select product,sum(price) from orders where product=“aa” GROUP BY product HAVING sum(price)>100 ORDER BY sum(price);
where,group by,having,order by的时候,执行顺序和编写顺序
:
https://blog.csdn.net/sinat_40692412/article/details/81200133