title: Query to display one to many result in a single table
body: <p>Ive been trying to use the GROUP function and also PIVOT but I cannot wrap my head around how to merge these tables and combine duplicate rows. Currently my SELECT statement returns results with duplicate UserID rows but I want to consolidate them into columns.</p>
  <p>How would I join TABLE1 and TABLE2 into a new table which would look something like this:</p>
  <pre><code>NEW TABLE:
  UserID    Username  ParentID 1   ParentID 2
  --------- --------  --------     ----------
  1         Dave      1             2
  2         Sally     3             4
  
  
  
  TABLE1:
  UserID    Username  ParentID
  --------- --------  --------
  1         Dave      1
  1         Dave      2
  2         Sally     3
  2         Sally     4
  
  
  Table 2:
  ParentID  Username
  --------- --------
  1         Sarah
  2         Joe
  3         Tom
  4         Mark
  </code></pre>