title: MySQL: Combine multiple row values into single column?
body: <p><b>Database: MySQL</b></p>
  
  <p><b>Table: Teams</b></p>
  
  <pre><code>TeamID    INT
  TeamName  VARCHAR(20)
  </code></pre>
  
  <p><b>Table: People</b></p>
  
  <pre><code>PeopleID   INT
  FirstNameID INT
  LastNameID  INT
  </code></pre>
  
  <p><b>Table: TeamMembers</b></p>
  
  <pre><code>TeamID  INT
  PeopleID  INT
  </code></pre>
  
  <p><b>Table Example: Teams</b></p>
  
  <pre><code>TeamID       TeamName
  1            Team Xstream
  2            Team INsanity
  </code></pre>
  
  <p><b>Table Example: People</b></p>
  
  <pre><code>PeopleID   FirstNameID   LastNameID
  1          1351          453
  2          5463          763
  3          976           8762
  4          87            784
  5          187           465
  6          761           566
  7          376           2134
  </code></pre>
  
  <p><b>Table Example: TeamMembers</b></p>
  
  <pre><code>TeamID       PeopleID
  1            1
  1            3
  1            7
  2            2
  2            4
  2            5
  2            6
  </code></pre>
  
  <p><b>Desired Output:</b></p>
  
  <pre><code>TeamName       TeamMembers
  Team Xstream   John Smith/Jane Doe/Daniel Davis
  Team INsanity  Sally Sue/Tom Thomas/Jack Jones/Harry Henderson
  </code></pre>
  
  <p>There will not be a set number of TeamMembers per team, so it's not like I could have three subqueries because there will only be three team members.  I've lightly looked online, but I always get the best and most thorough answers here.  Any ideas or pointers, please let me know.  I honestly have no idea where to begin here.  Thanks.</p>