SELECT `chapter`.`id`, `chapter`.`slug` as chapter_slug, `manga`.`slug` as manga_slug, `manga_id`
FROM `chapter` JOIN `manga` ON `chapter`.`manga_id` = `manga`.`id`
WHERE `chapter`.`id` IN
(SELECT * FROM (SELECT `chapter_id`
FROM `page`
WHERE `compress` = 0
GROUP BY `chapter_id`
ORDER BY CAST(`page`.`filesize` AS INTEGER) DESC LIMIT 20) t1)
Выбирает все записи. Почему?
SELECT * FROM (SELECT `chapter_id`
FROM `page`
WHERE `compress` = 0
GROUP BY `chapter_id`
ORDER BY CAST(`page`.`filesize` AS INTEGER) DESC LIMIT 20) t1
Выбирает 20 штук.