title: Expand Col values based on names/email SQL
body: <p>I want to explode my table based on their 'KEY's and assort their names and emails separately into individual cols.</p>
  <p>In Python such scenarios are dealt easily(like we use explode in pandas). since I've just started with SQL I'm finding it difficult to get my feet wet. My googling didn't help me even next to were i want, hence reaching out to the community as a my last resort for some guidance. In essence i'm trying to expand my table with my KEY as the index and the names and emails exploded across multiple cols.</p>
  <p>my table:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>KEY</th>
  <th>FIRST</th>
  <th>MIDDLE</th>
  <th>LAST</th>
  <th>EMAIL</th>
  <th>FLAG_GENDER</th>
  <th>FLAG_DESCENT</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>ROBIN</td>
  <td>A</td>
  <td>SIMPSON</td>
  <td>ROBIN@PROTON.COM</td>
  <td>M</td>
  <td>-</td>
  </tr>
  <tr>
  <td>1</td>
  <td>NICOLE</td>
  <td>P</td>
  <td>SIMPOSON</td>
  <td>NIC@YAHOO.COM</td>
  <td>F</td>
  <td>NA</td>
  </tr>
  <tr>
  <td>1</td>
  <td>SANDY</td>
  <td></td>
  <td>LAYNE</td>
  <td></td>
  <td>F</td>
  <td>NA</td>
  </tr>
  <tr>
  <td>1</td>
  <td>BRUCE</td>
  <td></td>
  <td>NILLS</td>
  <td>BRUCENILLS@</td>
  <td>M</td>
  <td>NA</td>
  </tr>
  <tr>
  <td>1</td>
  <td>ERIC</td>
  <td></td>
  <td>WOOTEN</td>
  <td>ERICW@YAHOO.COM</td>
  <td>M</td>
  <td>NA</td>
  </tr>
  <tr>
  <td>5</td>
  <td>JUDY</td>
  <td></td>
  <td>THAMES</td>
  <td>JUDYTHAMES@YAHOO.COM</td>
  <td>F</td>
  <td>NA</td>
  </tr>
  <tr>
  <td>5</td>
  <td>JUDY</td>
  <td></td>
  <td>THAMES</td>
  <td>JUDY@GMAIL.COM</td>
  <td>F</td>
  <td>NA</td>
  </tr>
  <tr>
  <td>A290</td>
  <td>RENN</td>
  <td>J</td>
  <td>JOHNSON</td>
  <td>RENNY@COMCAST.COM</td>
  <td>M</td>
  <td>C</td>
  </tr>
  <tr>
  <td>K890</td>
  <td>JAMES</td>
  <td></td>
  <td>RODRIGUES</td>
  <td>NA</td>
  <td>M</td>
  <td>L</td>
  </tr>
  <tr>
  <td>189</td>
  <td>BECKIE</td>
  <td>KATE</td>
  <td>MOORS</td>
  <td>BECKIE@GMAIL.COM</td>
  <td>F</td>
  <td>-</td>
  </tr>
  <tr>
  <td>189</td>
  <td>BECKIE</td>
  <td></td>
  <td></td>
  <td>MOORSB@YAHOO.COM</td>
  <td>F</td>
  <td>-</td>
  </tr>
  <tr>
  <td>189</td>
  <td></td>
  <td></td>
  <td>MOORS</td>
  <td>BMOORS@GMAIL.COM</td>
  <td>F</td>
  <td>-</td>
  </tr>
  <tr>
  <td>189</td>
  <td>BECKIE</td>
  <td>KATE</td>
  <td>MOORS</td>
  <td>BECKIE@GMAIL.COM</td>
  <td>F</td>
  <td>-</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>output table:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>KEY</th>
  <th>FULL NAME_1</th>
  <th>FULL NAME_2</th>
  <th>FULL NAME_3</th>
  <th>FULL NAME_4</th>
  <th>FULL NAME_5</th>
  <th>EMAIL_1</th>
  <th>EMAIL_2</th>
  <th>EMAIL_3</th>
  <th>EMAIL_4</th>
  <th>EMAIL_5</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>ROBIN A SIMPSON</td>
  <td>NICOLE P SIMPOSON</td>
  <td>SANDY LAYNE</td>
  <td>BRUCE NILLS</td>
  <td>ERIC WOOTEN</td>
  <td>ROBIN@PROTON.COM</td>
  <td>NIC@YAHOO.COM</td>
  <td>NA</td>
  <td>BRUCENILLS@</td>
  <td>ERICW@YAHOO.COM</td>
  </tr>
  <tr>
  <td>5</td>
  <td>JUDY THAMES</td>
  <td>JUDY THAMES</td>
  <td></td>
  <td></td>
  <td></td>
  <td>JUDYTHAMES@YAHOO.COM</td>
  <td>JUDY@GMAIL.COM</td>
  <td></td>
  <td></td>
  <td></td>
  </tr>
  <tr>
  <td>A290</td>
  <td>RENN J JOHNSON</td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td>RENNY@COMCAST.COM</td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  </tr>
  <tr>
  <td>K890</td>
  <td>JAMES RODRIGUES</td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td>NA</td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  </tr>
  <tr>
  <td>189</td>
  <td>BECKIE KATE MOORS</td>
  <td>BECKIE MOORS</td>
  <td>MOORS</td>
  <td>BECKIE KATE MOORS</td>
  <td></td>
  <td>BECKIE@GMAIL.COM</td>
  <td>MOORSB@YAHOO.COM</td>
  <td>BMOORS@GMAIL.COM</td>
  <td>BECKIE@GMAIL.COM</td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>