title: How do I join multiple records into a single record in SQL?
body: <p>Here is my input table:  </p>
  
  <pre><code>ID    Position  Email  
  1     1         email1  
  1     2         email2  
  1     3         email3  
  2     1         emaila  
  3     1         emailz  
  3     2         emaily  
  </code></pre>
  
  <p>This is the output table I'd like to fill:</p>
  
  <pre><code>ID  primary_email Secondary_email    
  1   email1        email2  
  2   emaila  
  3   emailz        emaily  
  </code></pre>