不需要sum,直接 select c.cust_name,t.order_num,t.OrderTotal from Orders o join (select order_num,quantity*item_price OrderTotal from OrderItems) t on t.order_num=o.order_num join Customers c on c.cust_id=o.cust_id order by c.cust_name,t.order_num; 就好了
3

相关推荐

notbeentak...:孩子,说实话,选择很重要,可能你换一个方向会好很多,但是现在时间不太够了,除非准备春招
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务