select id,name,score from (select g.id ,name,score,dense_rank()over(partition by name order by score desc)as r from grade as g left join language as l on g.language_id = l.id)as d where r<3