title: MySQL Variable, GROUP_CONCAT not working
body: <p>I have an issue where the variable doesn't equal the output. A pet has one owner and this tries to see if that owner has other pets and group them together. </p>
  
  <pre><code>SELECT
  o.id,
  o.last_name,
  @dog_names := GROUP_CONCAT(concat(p2.name,' (',REPLACE(REPLACE(p.type,'Big Dog','BD'),'Small Dog','LD'),')') SEPARATOR ', ') as dog_names,
  @dog_names as dog_variable,
  concat(o.last_name,' - ',@dog_names) as label
  FROM pets p
  LEFT JOIN owners o ON p.owner_id = o.id
  LEFT JOIN pets p2 ON p.owner_id = p2.owner_id
  WHERE p.name = 'wolfie'
  GROUP BY o.id
  </code></pre>
  
  <p>The output is as follows:</p>
  
  <pre><code>id   | last_name | dog_names               | dog_variable | label
  1647 | Reeve     | Wolfie (BD), Ember (BD) | Wolfie (BD)  | Reeve - Wolfie (BD)
  </code></pre>
  
  <p>Why does the dog_variable not match dog_names?</p>