题解 | 计算总和

select
    order_num,
    sum(item_price * quantity) total_price
from
    test.OrderItems
group by
    order_num
having
    sum(item_price * quantity) >= 1000
order by
    order_num asc

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务