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)都只能是出现过的字段名或者函数