SELECT c.cust_name,SUM(a.item_price*a.quantity) AS total_price FROM OrderItems a INNER JOIN Orders b ON a.order_num = b.order_num INNER JOIN Customers c ON b.cust_id=c.cust_id GROUP BY c.cust_name HAVING total_price>1000 ORDER BY total_price ASC;
SELECT c.cust_name,SUM(a.item_price*a.quantity) AS total_price FROM OrderItems a INNER JOIN Orders b ON a.order_num = b.order_num INNER JOIN Customers c ON b.cust_id=c.cust_id GROUP BY c.cust_name HAVING total_price>1000 ORDER BY total_price ASC;