I disagree with the solution. A list of rankings should not have gaps, which RANK would leave. You could see a list such as 1, 2, 3, 3, 5, which makes no sense. It might be sufficient to determine the prizes, but the preferable list would be 1, 2, 3, 3, 4, which DENSE_RANK would yield.
As proof I submit the following data, T-SQL and results:
Player 1 | Score 12 |
Player 2 | Score 14 |
Player 3 | Score 16 |
Player 4 | Score 12 |
Player 5 | Score 13 |
Player 6 | Score 14 |
Player 7 | Score 17 |
SELECT RANK() OVER (ORDER BY SCORE) As Rank
,[Score]
,[Player]
FROM [ScratchPad].[dbo].[Scores]
Rank Score Player
1 12 4
1 12 1
3 13 5
4 14 6
4 14 2
6 16 3
7 17 7
SELECT DENSE_RANK() OVER (ORDER BY SCORE) As DenseRank
,[Score]
,[Player]
FROM [Scratch
DenseRank Score Player
1 12 4
1 12 1
2 13 5
3 14 6
3 14 2
4 16 3
5 17 7