title: Double inner join with 3 tables
body: <p>Update years later:</p>
  
  <p>I came back to answer my own question. I had no idea what an inner join was and apparently completely misused the term here. </p>
  
  <hr>
  
  <p>I currently have the following 3 tables:</p>
  
  <p><strong>Team</strong></p>
  
  <pre><code>TeamID
  </code></pre>
  
  <p><strong>Player</strong></p>
  
  <pre><code>PlayerID | TeamID
  </code></pre>
  
  <p><strong>Match</strong></p>
  
  <pre><code>Player1 | Player2 | Round
  </code></pre>
  
  <p>I want to write a query showing a match like:</p>
  
  <pre><code>Team1 | Team2
  </code></pre>
  
  <p>I figured out how to join my tables player and match, so far that works too, but I can't figure out how to replace the player name with the team name. Any idea? I have the following:</p>
  
  <pre><code>SELECT P1.PlayerID AS Player1, P2.PlayerID AS Player2
  FROM MATCH
  INNER JOIN PLAYER AS P1 ON MATCH.Player1 = P1.PlayerID
  INNER JOIN PLAYER AS P2 ON MATCH.Player2 = P2.PlayerID
  </code></pre>