Score
100
99
99
98
97
O rank
Ranking should be 1,2,2,4,5
How to write the SQL language,
CodePudding user response:
SELECT grades, (SELECT COUNT (*) FROM table WHERE b. B grade & lt; A. grades) + 1 ranked FROM table AS AThe ORDER BY DESC
CodePudding user response:
SELECT grades, (SELECT COUNT (*) FROM table WHERE b. B grade & lt; A. grades) + 1 ranked FROM table AS A