> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/functions-reference/window/dense-rank",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference material for DENSE_RANK function

# DENSE_RANK OVER

Rank the current row within the requested window.

For more information on usage, please refer to [Window Functions](/reference-sql/functions-reference/window).

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
DENSE_RANK() OVER ([PARTITION BY <partition_by>] ORDER BY <order_by> [ASC|DESC] )
```

## 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.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT
	nickname,
	level,
	highscore,
	DENSE_RANK() OVER (PARTITION BY level ORDER BY highscore DESC ) AS game_rank
FROM
	players;
```

**Returns**:

| nickname    | level | highscore | game\_rank |
| :---------- | :---- | :-------- | :--------- |
| kennethpark | 9     | 76        | 6          |
| sabrina21   | 10    | 78        | 3          |
| rileyjon    | 11    | 94        | 1          |
| ymatthews   | 12    | 92        | 4          |
