题解 | #返回订单数量总和不小于100的所有订单的订单号#

返回订单数量总和不小于100的所有订单的订单号

http://www.nowcoder.com/practice/ff77e82b59544a15987324e19488aafd

SELECT order_num
from
 (select *,
sum(quantity) over (partition by order_num ) a
FROM OrderItems) b
where a >100


窗口函数解法,注意窗口 函数只能放在select子句中,具体解释可查 https://blog.csdn.net/ljh18885466426/article/details/119896641
全部评论

相关推荐

Z_eus:别打招呼直接发你的优势
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务