Když diskuse,tak s LopuchemLopuch.cz
SELECT * FROM `zbozi` `outer`WHERE 20 > (SELECT COUNT(*) FROM `zbozi` `inner` WHERE `inner`.`kategorie`=`outer`.`kategorie` AND `inner`.`id` > `outer`.`id`)ORDER BY `kategorie`, `id`