Isso retornará a classificação dos alunos, a ID do aluno e o GPA.
set @rownum := 0;
SELECT @rownum := @rownum + 1 AS rank, student_id, gpa
FROM `students` ORDER BY gpa DESC
set @rownum := 0;
SELECT @rownum := @rownum + 1 AS rank, student_id, gpa
FROM `students` ORDER BY gpa DESC