SELECT cust_name, order_num, SUM(quantity * item_price) AS OrderTotal
FROM Customers
INNER JOIN Orders USING(cust_id)
INNER JOIN OrderItems USING(order_num)
GROUP BY cust_name, order_num
ORDER BY cust_name, order_num;
SELECT cust_name, order_num, SUM(quantity * item_price) AS OrderTotal
FROM Customers
INNER JOIN Orders USING(cust_id)
INNER JOIN OrderItems USING(order_num)
GROUP BY cust_name, order_num
ORDER BY cust_name, order_num;