My query:
SELECT *
FROM forum_topics
WHERE cat_id IN(1,2,3,4,5,6,7)
ORDER BY last_message DESC
LIMIT 7
I want to get the biggest and only one value of each cat_id (7 values total). How to correct this query to make it work if it's even possible?
There is forum topics and each has value last_message
and I want to get the latest topic's message's time. Hope it's clear.
Thank you