SELECT S,Sname,Sage,Ssex,score FROM ( SELECT t3.S,t4.Sname,t4.Sage,t4.Ssex,t3.score, DENSE_RANK() over(ORDER BY t3.score DESC ) rk FROM SC t3 LEFT JOIN Staff t4 ON t3.S = t4.S WHERE C = ( SELECT C FROM Course t1 LEFT JOIN Teacher t2 ON t1.T = t2.T WHERE t2.Tname = 'Tom&(31395)#39; ) ) t5 where rk = 1 ORDER BY S