mysql - Select only 1 row when multiple max values -


I want to select maximum value in column A. Now, I have more than one value in column A. How do I just take 1 row with the maximum value and close the bar smoothly? Tried to use separate and boundary 1 without success.

Expected : Only 2 rows, 1's message is "srth" and the other has "same-ts-1" or "one-s-t2", but both Not only that, because they have the same maximum TS 1413588888

My query:

  SELECT A. *, as the URL U.K., DU An Inner Join (Active Tootstamp) TS, User, Partner FD DB_chats Group by User, Partner from Thumbnail DB_AATATS on TT Timestamp = TTS. And Ausser = T. User Left Job DB_UUzers DU on Tea PARTNER = DU.ID WHERE AUSER = 'UTQ 8 WDXD 66 SSRLIA 5 QT FOAAA 4H'  

Wired:

If you do not care that the line that stays the maximum time stamp has been returned, you can add the group to the user, Partner, Timestamp at the end of your query.

  SELECT A. *, as the URL DU Join User, DU Thumb, DB_KATS Join an Inner (Select Maximum Max TST, User, Partner FD DB_CHATES Group, User, Partner). Timestamp = t. TS and AUOS = T. User Left Job DB_UUzers DU on Tea Partner = DU.ID where user, partner, timestamp, auser = 'UTQ 8 wdx 66 slli 5 qtfuEE4h' group  


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Algorithm negotiation fail SSH in Jenkins -

java - Messages from .properties file do not display UTF-8 characters -