I have a requirement to rank the values, Where the upper & lower bound of the ranks are fixed.
lowest value is always Rank - 1 and highest value is Rank - 0, other values in the list needs to distributed between the boundaries evenly.
KEY_COL VALUE Rank_value_needed
E 10344 0
C 56 0.1
The following query should work for this requirement.
select key_col,val,percent_rank () over (order by val desc) as Rank_value_needed from Table;
Key Col Val Rank_Value_Needed
-------- --- -------------------------