AnalystPath

Esports Ladder Standings by Split

SQLMediumMid level~15 min

Problem

A competitive gaming league stores end-of-split results for every roster. A win is worth 3 ladder points and a draw is worth 1; losses are worth 0. Rank rosters within each split by, in order: ladder points (highest first), then round_diff = rounds_won minus rounds_lost (highest first), then roster_name alphabetically. Use a ranking that gives tied rows the same standing. Return split_id, roster_id, roster_name, victories, stalemates, defeats, rounds_won, rounds_lost and standing. Order the result by split_id, then standing, then roster_name.

Tables

Example rows — the live problem includes the full dataset.

split_results
split_idroster_idroster_namegames_playedvictoriesstalematesdefeatsrounds_wonrounds_lost
20211Nova Surge3829639926
20212Iron Wolves3828829426
20213Crimson Edge38211167633

Expected output

Your answer should return 10 rows with the columns split_id, roster_id, roster_name, victories, stalemates, defeats, rounds_won, rounds_lost, standing.

Starter code (SQL)

SELECT *
FROM split_results;

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