题解 | #纠错3#
纠错3
https://www.nowcoder.com/practice/3870c9bca7a4406f899af3e903b8bf51
SELECT order_num, COUNT(order_num) AS items FROM OrderItems GROUP BY order_num --只修改了该处 HAVING COUNT(order_num) >= 3 ORDER BY items, order_num;
可以看出是计算order num 出现的次数,所以是按照order_num分组