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 Type
INTEGER
Example
In this example below, players are ranked based on their test scores for their game level.| first_name | grade_level | test_score | rank_in_class |
|---|---|---|---|
| kennethpark | 9 | 76 | 6 |
| burchdenise | 12 | 89 | 5 |
| ymatthews | 11 | 75 | 3 |
| sabrina21 | 10 | 78 | 3 |