title: MySQL: Sort GROUP_CONCAT values
body: <p>In short: Is there any way to sort the values in a GROUP_CONCAT statement?</p>
  
  <p>Query:</p>
  
  <pre><code>GROUP_CONCAT((SELECT GROUP_CONCAT(parent.name SEPARATOR " &amp;raquo; ") 
  FROM test_competence AS node, test_competence AS parent 
  WHERE node.lft BETWEEN parent.lft AND parent.rgt 
    AND node.id = l.competence 
    AND parent.id != 1 
  ORDER BY parent.lft) SEPARATOR "&lt;br /&gt;\n") AS competences
  </code></pre>
  
  <p>I get this row:</p>
  
  <blockquote>
    <p>Crafts &raquo; Joinery</p>
    
    <p>Administration &raquo; Organization</p>
  </blockquote>
  
  <p>I want it like this:</p>
  
  <blockquote>
    <p>Administration &raquo; Organization</p>
    
    <p>Crafts &raquo; Joinery</p>
  </blockquote>