这个错误的出现是由于,在子查询里面用了limit所导致的,如下是错误的做法:
select * from table where type in
(select type from table group by type order by count(*) desc limit 3)
要解决这个问题,只要子查询里面再套一层就可以了,如下:
select * from table where type in
(select type from(select * from table group by type order by count(*) desc limit 3) as t )