select cust_name,sum(item_price*quantity) as total_price 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
having total_price >= 1000
order by total_price;
select cust_name,sum(item_price*quantity) as total_price 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
having total_price >= 1000
order by total_price;