DENSE_RANK over descending scores
SELECT
score,
DENSE_RANK() OVER (ORDER BY score DESC) AS rank
FROM scoresDENSE_RANK is purpose-built for this requirement. Equal scores share the same rank, and the next distinct score gets the next consecutive rank value with no gaps.