Add support for GROUP_CONCAT(id ORDER BY name ASC LIMIT 3) to only get first few ids when GROUP BY is used.
This can be used but needs some post processing
SELECT id, category
FROM titles
GROUP 3 BY category WITHIN GROUP ORDER BY name ASC;
And this still concatenates all ids, not just first 3
SELECT category, GROUP_CONCAT(id) AS ids
FROM titles
GROUP 3 BY category WITHIN GROUP ORDER BY name ASC;