All challenges

Challenge 15

Build the League Table

Rebuild last season's final Premier League table from all 380 results – and check it against the real one.

IntermediateComplexity:Time: 30–45 min

Your task

Here are all 380 results of the 2024–25 Premier League season as one data fileA JSON file that programs can read: here, one object per match with the teams, the date and the full-time score.. Rebuild the final table: one row per team with games played, points, goal differenceGoals scored minus goals conceded over the season. When two teams have the same points, the better goal difference ranks higher. and goals scored, in the right order from champion to last place.

Your bonus task

Make the table work for any date you choose – for example, show how it stood on Christmas Day 2024 – without changing anything else.

Example use cases

  • A five-a-side league that publishes its own standings from a results sheet.
  • A sports newsletter that recalculates the table the moment the weekend's scores come in.
  • Any report that adds up events per person, product or team – sales per rep, tickets per agent.

Before you start

  1. 01

    Sign up for n8n Cloud or open your n8n workspace. No other account or key is needed.

  2. 02

    The results file is https://n8n-challenges.app/fixtures/premier-league-2024-25.json, a copy of the public-domain openfootball data. Each match has team1 (home), team2 (away), date and score.ft, the full-time score as [home goals, away goals]. Other leagues and seasons live in the same repository.

  3. 03

    Have the official 2024–25 final table at hand (any sports site) to compare your result.

What the workflow must do

  1. 01

    The output has exactly 20 rows, one per team, each with 38 games played, points, goal differenceGoals scored minus goals conceded over the season. When two teams have the same points, the better goal difference ranks higher. and goals scored, numbered from 1 to 20.

  2. 02

    The order matches the official table: Liverpool first with 84 points and Southampton last with 12 – and Newcastle United sit above Aston Villa, who also have 66 points, thanks to goal differenceGoals scored minus goals conceded over the season. When two teams have the same points, the better goal difference ranks higher..

  3. 03

    Bonus: with 25 December 2024 as the date, the same workflow shows Liverpool top with 39 points from 16 games and Southampton bottom with 6.

Solution

See the workflow challenge answer

Reveal the completed workflow only when you are ready to compare it with your own.

Submit as solved

Ready to submit?

Submit when your team has a working workflow to demonstrate.

Solution

Reveal the workflow solution?

This will show the completed workflow for this challenge. Are you sure you want to continue?

Mentor review

Find a mentor and ask them to review.

Show them your working workflow. Once they approve it, collect the balloon for this challenge.