title: mysql group_concat in subquery returns more than one row
body: <p>I have the query, below, which should work. But, MySQL is giving me the error message 'Subquery returns more than one row'.</p>
  
  <pre><code>select e.episode_pk,
  (select group_concat(d.fulldescription separator ', ')
      from episode_rhythm er join diagnosis d on er.diagnosis_fk = d.diagnosis_pk 
      WHERE er.episode_fk = e.episode_pk group by d.fulldescription) as rhythmDesc 
  from episode e  
  WHERE e.patientid_fk='89976' 
  </code></pre>
  
  <p>The entire purpose of using the group_concat in this query is to return only one row per 'episode'. </p>
  
  <p>The outer select returns multiple rows. </p>
  
  <p>The inner select, when run for a single episode table primary key, returns a single row as you would suspect:</p>
  
  <pre><code>select group_concat(d.fulldescription separator ', ')
          from episode_rhythm er join diagnosis d on er.diagnosis_fk = d.diagnosis_pk 
          WHERE er.episode_fk = 234776 group by d.fulldescription
  </code></pre>
  
  <p>The inner select without the group_concat, when run for a single episode table primary key, may return multiple rows:</p>
  
  <pre><code>select d.fulldescription
          from episode_rhythm er join diagnosis d on er.diagnosis_fk = d.diagnosis_pk 
          WHERE er.episode_fk = 234776
  </code></pre>
  
  <p>What do I need to do to get this to work as I would expect?</p>