题解 | #确定最佳顾客的另一种方式(二)#

确定最佳顾客的另一种方式(二)

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

select cust_name, sum(item_price*quantity) as total_price
from  Orders
inner join OrderItems  on OrderItems.order_num=Orders.order_num
inner join Customers on Customers.cust_id=Orders.cust_id
group by cust_name
having total_price >=1000
order by total_price;
全部评论
为什么这道题一定要用sum()啊?题目中没有重复的order_num,也要用sum()来计算total_price吗
点赞 回复 分享
发布于 2022-08-08 17:28

相关推荐

05-23 20:31
已编辑
武汉大学 Java
内向的柠檬精在研究求职打法:注意把武大标粗标大 本地你俩不是乱杀
点赞 评论 收藏
分享
喜欢飞来飞去的雪碧在刷代码:可以试一试字节
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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