select * from (SELECT a.categoryid,a.infoid from information a where (select count(*) from information b where a.CategoryID =b.categoryid and a.infoid>b.infoid)<3order by a.categoryid,infoid) c where c.CategoryID in (28) ;