I need to give the rank in mysql table , suppose there is table name test with marks 45,55,55,65,75 then 75 should have rank 1 and so on
original table
name marks
tom 55
joe 56
sally 57
result needed
name marks rank
tom 55 3
joe 56 2
sally 57 1
You would need to order the users by marks and then count their position. This can be done in the following way:
Inspriation / source