MySQL Select Statement DISTINCT for Multiple Columns -


I am currently trying to create a somewhat difficult MySQL selection statement. This is what I am trying to do:

I have a table:

  data_table uniqueID stringID Subject 1 144 "My subject" 2 144 "My subject - New "3 144" My Subject - The Newest "4 211" Some Other Columns "Actually, what I would like to do / would be able to select / group by string id ( Picture string id is threaded) and it has not been duplicated. In addition, I would like to select the most recent string ID line, (which is unique in the example above 3).  

Therefore, if I ask the database, then this is the following (most recently UIIID on top):

  uniqueID stringID topic 4 211 "some other column" 3 144 "My Theme - Latest" // Notice This is the most recent and specific string ID line proper topic column  

I hope this makes sense. Thank you for you.

Try the following This can not be the most efficient query, but it will work: , IDILIDIDID by StringID, DESC


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -