I'm having a little bit of a problem. I've never gotten myself too involved in learning the finer, clever, intricacies of MySQL before - but I'm working on it at the moment. But I've hit a stumbling block that I can't seem to find the answer to (though it's probably blindingly obvious).
For the application I'm working on, I have a table of times users have submitted (a user can have multiple times) associated to the user by way of the userId.
I need to find, in that table, the position of that user in the ranking (i.e. the position that user falls in a ranking of fastest time by each user ordered fastest>slowest).
For example:
Would need to be sorted:
Then if I want to get uid 1's position, I get back '3'.
Complex, I know... but hey - I'm sure it must be doable.
Any help appreciated
For the application I'm working on, I have a table of times users have submitted (a user can have multiple times) associated to the user by way of the userId.
I need to find, in that table, the position of that user in the ranking (i.e. the position that user falls in a ranking of fastest time by each user ordered fastest>slowest).
For example:
uid time
==============
1 24.28
4 28.21
2 32.11
2 21.29
3 23.86
4 43.21
Would need to be sorted:
uid time
==============
2 21.29
3 23.86
1 24.28
4 28.21
Then if I want to get uid 1's position, I get back '3'.
Complex, I know... but hey - I'm sure it must be doable.
Any help appreciated