SELECT
    c.cust_name as cust_name,
    o.order_num as order_num,
    SUM(oi.quantity * oi.item_price) as OrderTotal
FROM
    Customers c
    INNER JOIN Orders o ON c.cust_id = o.cust_id
    INNER JOIN OrderItems oi ON o.order_num = oi.order_num
GROUP BY
    cust_name,
    order_num
ORDER BY
    cust_name,
    order_num
#除了返回顾客名称和订单号,返回 Customers 表中的顾客名称(cust_name)和Orders 表中的相关订单号(order_num),添加第三列 OrderTotal,其中包含每个订单的总价,并按顾客名称再按订单号对结果进行升序排序。