title: MySQL "join as"?
body: <p>I have two tables joined together:</p>
  
  <p><img src="https://i.imgur.com/SNC3YFp.png" alt="table_diagram"></p>
  
  <p>the <code>book_types_purchased</code> is <code>ENUM('paperback','hardcover')</code>. I want to get this type of row returned:</p>
  
  <pre>
  book_title | paperback_date_purchased | hardcover_date_purchased
  </pre>
  
  <p>Is there a way to do this in MySQL?</p>
  
  <hr>
  
  <h1>UPDATE</h1>
  
  <p>Here is the answer from below with matching table names and left joins instead:</p>
  
  <pre><code>SELECT title,
    paperback.date_purchased AS paperback_date_purchased,
    hardcover.date_purchased AS hardcover_date_purchased
  
  FROM book_projects
  
  LEFT JOIN book_types_purchased AS paperback 
    ON paperback.book_project_id = book_projects.id
    AND paperback.type = 'paperback'
  
  LEFT JOIN book_types_purchased AS hardcover 
    ON hardcover.book_project_id = book_projects.id
    AND hardcover.type = 'hardcover'
  </code></pre>