Rank for values in table
Hi guys,
I'm trying to write a select query that ranks the values in a table.
I'd appreciate your help with this.
Example values:
Name | Age
Bob | 15
Ron | 4
John | 29
Mike | 4
Joe | 2
The select result I'm looking to get is (sorted largest to smallest):
Rank | Name | Age
1 |John | 29
2 |Bob | 15
3 |Ron | 4
3 |Mike | 4
4 |Joe | 2
*The duplicate values should be able to share a rank like in the example above.
Hi guys,
I'm trying to write a select query that ranks the values in a table.
I'd appreciate your help with this.
Example values:
Name | Age
Bob | 15
Ron | 4
John | 29
Mike | 4
Joe | 2
The select result I'm looking to get is (sorted largest to smallest):
Rank | Name | Age
1 |John | 29
2 |Bob | 15
3 |Ron | 4
3 |Mike | 4
4 |Joe | 2
*The duplicate values should be able to share a rank like in the example above.