Skip to content

Instantly share code, notes, and snippets.

@moacirmoda
Created April 5, 2017 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moacirmoda/e1ed18225d54f3cfaa79f404c8c93354 to your computer and use it in GitHub Desktop.
Save moacirmoda/e1ed18225d54f3cfaa79f404c8c93354 to your computer and use it in GitHub Desktop.
Query para extrair informações de partidas do European Soccer Database
select
c.name as country,
l.name as league,
t.team_long_name as home_team,
t2.team_long_name as away_team,
m.*
from "Match" m
inner join Country c ON c.id = m.country_id
inner JOIN League l ON l.id = m.league_id
inner JOIN Team t ON t.team_api_id = m.home_team_api_id
inner JOIN Team t2 ON t2.team_api_id = m.away_team_api_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment