题解 | #返回订单数量总和不小于100的所有订单的订单号#
返回订单数量总和不小于100的所有订单的订单号
https://www.nowcoder.com/practice/ff77e82b59544a15987324e19488aafd
select order_num from OrderItems group by order_num having sum(quantity)>=100 order by order_num
count()和sum()的区别注意区分:
count():汇总,但是汇总属性总数即你出现几次就count几次
sum():汇总,求和函数,对数据的求和相加得出结果