SELECT a.player, a.goals, (SUM(a.goals > b.goals) + 1 + SUM(a.goals >= b.goals))/2 AS score
FROM goals a
CROSS JOIN goals b
GROUP BY player
This works because SUM(a.goals > b.goals) + 1
is the minimum rank of all the tied players, while SUM(a.goals >= b.goals)
is the maximum rank. So this averages the two ends of the range to get the score.