Files
baseball-db/sql_scripts/get_game_details.sql
Anthony Correa 7ea5fd15df Refactor project structure and update configurations
- Renamed and deleted several Python modules
- Added new SQL and database scripts
- Updated `.vscode` and `requirements.txt` configurations
2025-08-27 08:33:51 -05:00

22 lines
540 B
SQL

SELECT
game.id,
game.date,
team_home.name AS home_team,
team_visitor.name AS visitor_team,
venue.name AS venue_name,
gameresult.home_runs_for,
gameresult.visitor_runs_for,
gameresult.home_outcome,
gameresult.visitor_outcome
FROM
game
JOIN
team AS team_home ON game.home_team_id = team_home.id
JOIN
team AS team_visitor ON game.visitor_team_id = team_visitor.id
JOIN
venue ON game.venue_id = venue.id
LEFT JOIN
gameresult ON game.id = gameresult.game_id
ORDER BY
game.date;