Use Of Ranking Functions
Like Row_Number() , Rank() , Dense_Rank()
Select
Row_Number() Over ( Order By Percentage Desc) as Sr_No,
Rank() Over (Order By Percentage Desc) as Rank,
Dense_Rank() Over (Order By Percentage Desc) as Dense_Rank,
Student_Name,
Percentage
From Students
Sr_No Rank Dense_Rank Student_Name Percentage
1 1 1 Ankur 80.00
2 2 2 Vinod 78.00
3 2 2 Mahmad 78.00
4 4 3 Amol 70.00
5 4 3 Varun 70.00
6 6 4 Rajesh 69.00
7 6 4 Bharat 69.00
8 8 5 Parixit 35.00
Saturday, August 1, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment