Skip to content
Brainlag
  1. Library
  2. Challenges
  3. SQL

Build the league table from match results

Turn a season of football scores into a proper league table: played, won, drawn, lost, goals for and against, goal difference and points, as a view.

SQLStretch35 minCode

Code

Inside: 2 checks, no scaffolding.

See what’s includedAlready have Brainlag Code? Sign in

Code editor. Press Control or Command plus Enter to run the code. Tab indents; to move focus out of the editor, press Escape and then Tab.