title: Join multiple tables with same column name
body: <p>I have these tables in my MySQL database:</p>
  <p>General table:</p>
  <pre><code>+----generalTable-----+
  +---------------------+
  | id | scenario | ... |
  +----+----------+-----+
  | 1  | facebook | ... |
  | 2  | chief    | ... |
  | 3  | facebook | ... |
  | 4  | chief    | ... |
  </code></pre>
  <p>Facebook Table:</p>
  <pre><code>+----facebookTable-----+
  +----------------------+
  | id | expiresAt | ... |
  +----+-----------+-----+
  | 1  | 12345678  | ... |
  | 3  | 45832458  | ... |
  </code></pre>
  <p>Chief Table:</p>
  <pre><code>+------chiefTable------+
  +----------------------+
  | id | expiresAt | ... |
  +----+-----------+-----+
  | 2  | 43547343  | ... |
  | 4  | 23443355  | ... |
  </code></pre>
  <p>Basically, the general table holds some (<em>obviously</em>) general data. Based on the generalTable.scenario you can look up more details in the other two tables, which are in some columns familiar (expiresAt for example) but in others not.</p>
  <p><strong>My question is, how to get the joined data of generalTable and the right detailed table in just one query.</strong></p>
  <p>So, I would like a query like this:</p>
  <pre><code>SELECT id, scenario, expiresAt 
  FROM generalTable
      JOIN facebookTable
          ON generalTable.id = facebookTable.id
      JOIN chiefTable
          ON generalTable.id = chiefTable.id
  </code></pre>
  <p>And an output like this:</p>
  <pre><code>| id | scenario | expiresAt |
  +----+----------+-----------+
  | 1  | facebook | 12345678  |
  | 2  | chief    | 43547343  |
  | 3  | facebook | 45832458  |
  | 4  | chief    | 23443355  |
  </code></pre>
  <p>However, this doesn't work, because both facebookTable and chiefTable have ambiguous column name &quot;expiresAt&quot;. For the ease of use I want to keep it that way. The result table should also only have one column &quot;expiresAt&quot; that is automatically filled with the right values from either facebookTable or chiefTable.</p>