userID point
111 20
111 30
222 40
222 50
I want to order like this
222 50
111 30
every userId Max value order by DESC
To order by MAX point values
SELECT userID, MAX(point)
FROM [table]
GROUP BY userID
ORDER BY MAX(point) DESC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With