title: My SQL group_concat sorting the concatenated column correct but not the rest of the columns?
body: <p>I have a mysql question that I thought wouldn't be a question. I am trying to group concat by one column, but then pretty much keep the rest of the columns in the same order. For example, my output for the 3rd listing is "9Lives......." The overline is sorting how I want it to, by "popular" in descending order. How do i make the rest of the columns sort in the same way so that the "itemupc" matches with the overline information??</p>
  
  <p>Here is the code:</p>
  
  <pre class="lang-sql prettyprint-override"><code>select group_concat( distinct overline order by popular desc) as 'overline' ,item, itemupc,popular
  from shelftalkers
  group by item,size;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/RLPai.png" alt="sql code with output"></p>