select t1.id,l.name,t1.score
from(
select id,language_id,score,
    dense_rank() over(partition by language_id order by score desc) score_rank
> from grade) t1
left join language l 
on t1.language_id=l.id
where t1.score_rank<=2
order by l.name,t1.score desc,t1.id;