Quote:
Originally Posted by robasc
never mind I figured it out:
|
congrats to you
however, you're joining on the wrong columns
you have t1.team_name as Home, but you're joining t1.teams_id to g.visitor!
also, you could improve on the query structure a little bit...
Code:
SELECT home.team_name as home
, games.home_score
, away.team_name as visitor
, games.visitor_score
, games.game_date
, games.game_time
, games.venue
FROM games
INNER
JOIN teams as home
ON home.teams_id = games.home
INNER
JOIN teams AS away
ON away.teams_id = games.visitor
ORDER
BY games.game_date
, games.game_time