1select strftime(m.date, '%Y-%m-%d') as match_date, home_teams.name as home_team, away_teams.name as away_team, cast(home_score as int) || '-' || cast(away_score as int) as score, home_score + away_score as num_goals
2from @blt.ultimate_soccer_dataset.seasons s
3inner join @blt.ultimate_soccer_dataset.competitions c on (s.competition_id = c.competition_id)
4inner join @blt.ultimate_soccer_dataset.matches m on (m.season_id = s.season_id)
5inner join @blt.ultimate_soccer_dataset.teams home_teams on (m.home_team_id = home_teams.team_id)
6inner join @blt.ultimate_soccer_dataset.teams away_teams on (m.away_team_id = away_teams.team_id)
7where slug = 'premier-league' and year(s.start_date) BETWEEN 2015 and 2024
8 and status = 'Match Finished'
9order by num_goals desc
10limit 10
11