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

select
    cust_name,
    ord.order_num,
    quantity * item_price OrderTotal
from
    Customers cus
    join Orders ord on cus.cust_id = ord.cust_id
    join OrderItems ori on ord.order_num = ori.order_num
order by
    cust_name asc,
    ord.order_num asc

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

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