题解 | 返回订单数量总和不小于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
;
返回订单数量总和不小于100的所有订单的订单号
https://www.nowcoder.com/practice/ff77e82b59544a15987324e19488aafd
SELECT
order_num
FROM
OrderItems
GROUP BY
order_num
HAVING
SUM(quantity) >= 100
ORDER BY
order_num
;
相关推荐
查看3道真题和解析