I have the following table called questions:
ID | asker 1 | Bob 2 | Bob 3 | Marley
I want to select each asker only once and if there are
It's because ORDER BY is performed AFTER GROUP BY.
ORDER BY
GROUP BY
Try this:
SELECT * FROM questions WHERE id IN ( SELECT max(id) as id FROM questions GROUP by asker ORDER by id DESC )