Window functions
DENSE_RANK OVER
Reference material for DENSE_RANK function
Rank the current row within the requested window.
For more information on usage, please refer to Window Functions.
Syntax
Parameters
Parameter | Description | Supported input types |
---|---|---|
<partition_by> | The expression used for the PARTITION BY clause. | Any |
<order_by> | The expression used in the ORDER BY clause. This parameter determines what value will be ranked. | Any |
Return Types
Same as input type
Example
In this example below, players are ranked based on their high scores for their game level.
Returns:
nickname | level | highscore | game_rank |
---|---|---|---|
kennethpark | 9 | 76 | 6 |
sabrina21 | 10 | 78 | 3 |
rileyjon | 11 | 94 | 1 |
ymatthews | 12 | 92 | 4 |