I have a game application, I'm keeping track of the number of games won per user, something like:
// table: users
id | username | num_games_won
How would I tell a user their overall ranking in terms of num_games_won? For example:
id | username | num_games_won
-----------------------------------
723 john 203
724 mary 1924
725 steve 391
The rankings would be: mary->0, steve->1, john->2. Given a username, how would I find their ranking number? (I'm using mysql)
Thanks