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
The records need to be grouped using GROUP BY and MAX() to get the maximum ID for every asker.
GROUP BY
MAX()
asker
SELECT asker, MAX(ID) ID FROM TableName GROUP BY asker
OUTPUT
╔════════╦════╗ ║ ASKER ║ ID ║ ╠════════╬════╣ ║ Bob ║ 2 ║ ║ Marley ║ 3 ║ ╚════════╩════╝