SQL - Find top rows where parameter is the same
You need to calculate the rank per player. You are currently calculating the overall rank. 

To do it per player, you need to add a partition by to your window function:

rank() over (PARTITION BY player_name_fkey order by score desc) AS scorerank

You also need to remove the group by from the inner (t1) query:

SELECT player_name_fkey,
       school_name_fkey,
       sum(t1.score) AS sum_scores
FROM (
  SELECT player_name_fkey,
         school_name_fkey,
         score,
         rank() over (PARTITION BY player_name_fkey order by score desc) AS scorerank
  FROM simple
    LEFT JOIN players ON players.name = simple.player_name_fkey
  WHERE category = 'Benjamin'
    AND gender = 'Masculin'
) t1
WHERE scorerank &lt;= 2
GROUP BY player_name_fkey,
         school_name_fkey