I need some help dealing with ties when ranking in MySQL. For example:
PLAYER | POINTS
Assuming name is unique
SELECT t1.name, (SELECT COUNT(*) FROM table_1 t2 WHERE t2.score > t1.score) +1
AS rnk
FROM table_1 t1
SELECT players.*, COUNT(higher_ranking.id) + 1 AS rank
FROM players
LEFT JOIN players AS higher_ranking
ON higher_ranking.points > players.points
GROUP BY players.id
On Postgres, you could use window functions RANK() to achieve this, which is much nicer. I don't know of anything like that for MySQL.