title: Using query with group_concat to loop values but show lowest price
body: <p>I am using the query below to get all results and then then group them. It all works well. I now have multiple rows of identical data but with a different price. </p>
  
  <p>How can I do the same query but get just the row with the cheapest price when all other data is identical. I have spent ages but no joy at all. Please help.</p>
  
  <pre><code>$results = $wpdb-&gt;get_results($wpdb-&gt;prepare("    
  
  SELECT *,   
  group_concat(date,':',SUBSTRING_INDEX(flights,'|',2),':',price,':',board,':',$tablename.id separator ',') as itemx
  
  FROM $tablename
  WHERE post_type = 'product' 
  GROUP BY brochure
  LIMIT 20
  "));   
  </code></pre>