Right now this is my query:
SELECT *
FROM tblChatMessage
WHERE groupID IN (456, 789)
LIMIT 20
the limit needs to be in every part of the IN range (so 20 of the 456 and 20 of the 789). How can I do this? The range is variable to the case. It could be 2 or 100.