select order_num from OrderItems group by order_num having sum(quantity)>=100 order by order_num
先进行分组,然后使用having进行过滤,然后再进行排序,产生误区的是容易把sum(quantity)放置select后面
select order_num from OrderItems group by order_num having sum(quantity)>=100 order by order_num
先进行分组,然后使用having进行过滤,然后再进行排序,产生误区的是容易把sum(quantity)放置select后面