SELECT cust_name, SUM(item_price * quantity) AS total_price FROM Customers INNER JOIN Orders USING(cust_id) INNER JOIN OrderItems USING(order_num) GROUP BY cust_name HAVING total_price >= 1000; 分组这里,必须要是被select的作为分组标准,这就是为什么使用cust_name