php, show position between students : I have school project which I have done almost to finish, but am stacking on how to show position of student in class according to highest total marks gets.

Here the table `(exam_record)` which contain some of records of marks. In this result I want to say John is in position `1` out of `3` students that all. any help please.
       
    id   name  math   history   history geo  pds  average    total_marks
    003  John  90     100       90      100  88   93.6       468
    002  Joan  100    60        70      83   90   60.6       403  
    005  Wily  80     58        90      60   90   75.6       378 
