select c.cust_name, sum(t.item_price*t.quantity) as total_price from Customers c join Orders o on o.cust_id=c.cust_id join OrderItems t on t.order_num=o.order_num group by cust_name having total_price >= 1000 order by total_price #不能用where,而是分组后用having筛选 #为什么不用 WHERE? #WHERE 和 HAVING 的区别在于它们的作用时机...