I need some assistance, I'm working on a school project and having issue ranking the students according to the school specification. For example, in a class of 10 pupils, each pupil's score is 80,70,70,60,60,50,40,30,30,20
respectively. When using Rank
in SQL Server to get each pupil's rank, it will output this
Score Rank
------------
80 1
70 2
70 3
60 4
60 5
50 6
40 7
30 8
30 9
20 10
What I want is for pupils with the same score to have the same ranking. It should look like this
Score Rank
------------
80 1
70 2
70 2
60 4
60 5
50 6
30 7
30 7
30 7
20 10
I am using vb.net 2013 and Sql server 2012, and I'm displaying the data from the database to a DataGridView.