SELECT order_num, COUNT(*) AS items FROM OrderItems GROUP BY order_num -- 仅仅修改了分组的字段 HAVING COUNT(*) >= 3 ORDER BY items, order_num;