我感觉可读性有点差呀,我这个应该好理解一点把。 select cust_id, sum(total) total_ordered from Orders inner join ( select order_num, sum(quantity * item_price) total from OrderItems group by order_num ) b1 using (order_num) group by cust_id order by total_ordered desc
8

相关推荐

07-07 12:25
门头沟学院 Java
程序员牛肉:你这个智邮公司做的就是那个乐山市税务系统的服务吗?
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务