title: SQL query with associated column
body: <p>I have the following tables:</p>
  <p><code>Team</code></p>
  <pre><code>id | abbreviated_name 
  ----------------------
  1  | ATL
  2  | BOS
  3  | BRK
  </code></pre>
  <p><code>Schedule</code> has two foreign keys <code>home_team_id</code> and <code>visitor_team_id</code></p>
  <pre><code>id | game_date  | game_time | home_team_id | visitor_team_id
  ------------------------------------------------------------
  1  | 2021-01-01 | 7:00p ET  | 1            | 2
  2  | 2021-01-02 | 6:00p ET  | 2            | 3
  3  | 2021-01-03 | 7:00p ET  | 1            | 3
  </code></pre>
  <p>How do I query for all the rows in <code>Schedule</code> given a team abbreviated name? Say I want to find all the rows where <code>ATL</code> is playing both home and away games. I tried the following but the resulting dataset is way off.</p>
  <pre><code>SELECT *
  FROM schedule s
  JOIN team t
  WHERE s.home_team_id = (
      SELECT id
      FROM team
      WHERE team.abbreviated_name = 'ATL'
  )
  OR s.visitor_team_id = (
      SELECT id
      FROM team
      WHERE team.abbreviated_name = 'ATL'
  )
  </code></pre>
  <p>Appreciate the help!</p>