SELECT order_num FROM OrderItems GROUP BY order_num HAVING SUM(quantity) >=100 # WHERE 不能用聚合函数,HAVING中没有分组的列出现时必须使用聚合函数 ORDER BY order_num