SELECT a.cust_id,b.total_ordered FROM Orders a INNER JOIN (SELECT order_num,SUM(item_price*quantity) AS total_ordered FROM OrderItems GROUP BY order_num) b ON a.order_num=b.order_num ORDER BY total_ordered DESC;
SELECT a.cust_id,b.total_ordered FROM Orders a INNER JOIN (SELECT order_num,SUM(item_price*quantity) AS total_ordered FROM OrderItems GROUP BY order_num) b ON a.order_num=b.order_num ORDER BY total_ordered DESC;