I have a query that I want to rank from lowest to highest based on a group (Ord)
The follow sql ranks it highest to lowest
Rank: (SELECT Count(*) FROM ZPD_Count1 As U WHERE [Rate] > [ZPD_Count1].[Rate] AND U.Ord = ZPD_Count1.Ord)+1
Returns this result
Ord Rate Rank
123456 425.36 3
123456 725.25 2
123456 895.62 1
I want it to return
Ord Rate Rank
123456 425.36 1
123456 725.25 2
123456 895.62 3
Regardless of what I try I can not return the rank to what I want it.
The best I got it to do was the following but it always skipped 1
Ord Rate Rank
123456 425.36 2
123456 725.25 3
123456 895.62 4
Any suggestions would be greatly appreciated.
stapuff
The follow sql ranks it highest to lowest
Rank: (SELECT Count(*) FROM ZPD_Count1 As U WHERE [Rate] > [ZPD_Count1].[Rate] AND U.Ord = ZPD_Count1.Ord)+1
Returns this result
Ord Rate Rank
123456 425.36 3
123456 725.25 2
123456 895.62 1
I want it to return
Ord Rate Rank
123456 425.36 1
123456 725.25 2
123456 895.62 3
Regardless of what I try I can not return the rank to what I want it.
The best I got it to do was the following but it always skipped 1
Ord Rate Rank
123456 425.36 2
123456 725.25 3
123456 895.62 4
Any suggestions would be greatly appreciated.
stapuff