Reputation: 540
I have a table full of users and, using the below query, I'm able to get the result of the highest score divided by points:
SELECT MAX(points/score) FROM table
However, I'd like to grab the user associated with the result; any suggestions?
Upvotes: 1
Views: 57
Reputation: 51807
just order by points/score
and limit the result to one:
SELECT
*
FROM
table
ORDER BY
points/score DESC
LIMIT 1
Upvotes: 1