题解 | #纠错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 count(order_num), order_num;
#在出现group by语句时,字段名纠错以group by的为准;其他语句中
(包括select/having/order by等,除了where)都只能是出现过的字段名
或者函数