How would I go about this? I have 3 rows like so:
ID THREAD POST
1 1 Hello World
2 2 Hello galaxy
3 2 Hello people
I need to return ID, Thread, and Post once for each thread only using the lowest ID.
something like:
SELECT * FROM table WHERE THREAD DISTINT AND ID = MIN(ID)
Edit: To be more clear in this example it should only return the rows for 1 and 2 because 3 isn't the lowest ID with a Thread of 2
Edit 2: it needs to return both rows 1 and 2.