I am stumped on how to write query. My table scheme is:
ThreadID | CommentID | CommentDate
So the threadID is the priminary key and comments are added to threads. I want to sort the threadID by the most recent commentDate.
So I figured the query:
This sorta works, but it just returns all the rows sorted by CommentID. I want the ThreadID to be unique and return the most recent comment of that thread.Code:SELECT ThreadID, CommentDate FROM Comments ORDER BY CommentDate
Any hints on how to do this?