title: Using group_concat how to iterate each value as a column
body: <p>I am using MySQL.</p>
  
  <p>I want to be able to always return 1 row with 5 columns on my query. I have a student table and a committee table as follows:</p>
  
  <h2>Student Info Table</h2>
  
  <pre><code>Student_Number    Committee_Id
  00000001                5
  </code></pre>
  
  <h2>Committee Table</h2>
  
  <pre><code>Committee Id         Prof_Id
      5                   23
      5                   55
      5                    6
      5                   10
  </code></pre>
  
  <p>Using this statement:</p>
  
  <pre><code>select committee_id, group_concat(prof_id) as profs from committee_table 
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>profs        committee_id
  23,55,6,10       5
  </code></pre>
  
  <p>I want to return:</p>
  
  <pre><code>prof1 prof2 prof3 prof4 prof5
  23     55    6     10     null
  </code></pre>
  
  <p>Is there any way to do this simply?????</p>