Hi,
I am currently trying to construct a somewhat tricky MySQL Select Statement. Here is what I am trying to accomplish:
I have a table like this:
data_table
uniqueID stringID subject
1 144 "My Subject"
2 144 "My Subject - New"
3 144 "My Subject - Newest"
4 211 "Some other column"
Bascially, what I'd like to do is be able to SELECT/GROUP BY the stringID (picture that the stringID is threaded) and not have it duplicated. Furthermore, I'd like to SELECT the most recent stringID row, (which in the example above is uniqueID 3).
Therefore, if I were to query the database, it would return the following (with the most recent uniqueID at the top):
uniqueID stringID subject
4 211 "Some other column"
3 144 "My Subject - Newest" //Notice this is the most recent and distinct stringID row, with the proper subject column.
I hope this makes sense. Thank you for you help.