题解 | #返回顾客名称和相关订单号以及每个订单的总价#

返回顾客名称和相关订单号以及每个订单的总价

https://www.nowcoder.com/practice/4dda66e385c443d8a11570a70807d250

# select cust_id ,cust_name from Customers c,Orders o where c.cust_id=o.cust_id 

# select (quantity*item_price) as OrderTotal from  Orders o, OrderItems oi where o.order_num=oi.order_num 


select  cust_name , o.order_num , (quantity*item_price) as OrderTotal from Customers c , Orders o, OrderItems oi where c.cust_id=o.cust_id and o.order_num=oi.order_num  order by cust_name asc

全部评论

相关推荐

03-29 18:59
运城学院 Java
程序员小白条:咱们要对自己的简历和学历有清晰的认知,不要动不动就大厂了....都26届了,没实习还想着大厂,唉
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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