AnalystPath

Chess Club Standings

SQLEasyJunior level~15 min

Problem

A chess club tracks each member's tournament record in `club_records`. Each row has a `member_id`, a `member_name`, the number of `games_played`, and counts of `victories`, `stalemates`, and `defeats`.

Scoring awards 3 points per victory and 1 point per stalemate; defeats are worth nothing. For every member return their `member_id`, `member_name`, total `score`, and their `standing` — the ranking by score from highest to lowest, where members tied on score share the same standing and the next standing skips the appropriate number of positions (a standard competition ranking).

Order the result by `score` descending, then by `member_name` ascending.

Tables

Example rows — the live problem includes the full dataset.

club_records
member_idmember_namegames_playedvictoriesstalematesdefeats
1Nadia10622
2Bram10550
3Ivo10406

Expected output

Your answer should return 4 rows with the columns member_id, member_name, score, standing.

Starter code (SQL)

SELECT *
FROM club_records;

Solve this SQL question free

Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.

Solution & explanation

Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.

Sign up free to unlock

Related SQL questions