题解 | #返回顾客名称和相关订单号以及每个订单的总价#
返回顾客名称和相关订单号以及每个订单的总价
https://www.nowcoder.com/practice/4dda66e385c443d8a11570a70807d250
select ct.cust_name, od.order_num, ot.quantity * ot.item_price AS OrderTotal FROM Customers AS ct JOIN Orders AS od ON ct.cust_id = od.cust_id JOIN OrderItems AS ot ON ot.order_num = od.order_num ORDER BY cust_name,order_num