SQL Query: Select record on ID and find "rank" based on order
Posted on 2009-07-10
Here is the situation; I have a table which contains the following columns: ID, Highscore. What I need to do is figure out what rank a highscore is based on an ID provided... For example if I have the following data:
And I wanted to find the rank for ID 3 the rank returned would be 1 because it is the highest score. If I wanted to find the rank for ID 2 then a rank of 3 would be returned because it is the third highest score. I have done quite a bit of searching but I fear I do not have the correct search terms so it is being difficult ;)
Thanks in advance for any help you have to offer.