题解 | #返回更多的产品#
返回更多的产品
https://www.nowcoder.com/practice/dc91b7d2de3c4603a55995e83210f605
既然是要去重的表,既然要查每个订单有多少产品。那么说明订单数量分散,需要加总。
select distinct order_num from OrderItems group by order_num having sum(quantity) >= '100'
返回更多的产品
https://www.nowcoder.com/practice/dc91b7d2de3c4603a55995e83210f605
既然是要去重的表,既然要查每个订单有多少产品。那么说明订单数量分散,需要加总。
select distinct order_num from OrderItems group by order_num having sum(quantity) >= '100'
相关推荐