# Differences in Score Ranking Options

**URL:** https://meta.discourse.org/t/differences-in-score-ranking-options/340699
**Category:** Support
**Tags:** gamification
**Created:** [December 5, 2024, 6:27pm UTC](https://meta.discourse.org/t/differences-in-score-ranking-options/340699 "2024-12-05T18:27:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Victor\_Bramante](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/victor_bramante/32/445410_2.png) [@Victor\_Bramante](https://meta.discourse.org/u/Victor_Bramante)
#### Post date: [December 5, 2024, 6:27pm UTC](https://meta.discourse.org/t/differences-in-score-ranking-options/340699/1 "2024-12-05T18:27:03Z")

</div>

Hi,

Any one knows the differences between **dense\_rank** / **rank** / **row\_number** options in **score ranking strategy**?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 5, 2024, 6:34pm UTC](https://meta.discourse.org/t/differences-in-score-ranking-options/340699/2 "2024-12-05T18:34:05Z")

</div>

> `row_number` () → `bigint`  
> Returns the number of the current row within its partition, counting from 1.
> 
> `rank` () → `bigint`  
> Returns the rank of the current row, with gaps; that is, the `row_number` of the first row in its peer group.
> 
> `dense_rank` () → `bigint`  
> Returns the rank of the current row, without gaps; this function effectively counts peer groups.

Basically it changes how ties are handled.

- On row\_number there are no ties.
- On rank, if there are two tied at position 5, the next will be position 7 as 6 was skipped.
- On dense\_rank, if there are two tied at position 5, the next will be position 6.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [January 4, 2025, 6:34pm UTC](https://meta.discourse.org/t/differences-in-score-ranking-options/340699/3 "2025-01-04T18:34:52Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
