jeudi 21 juillet 2016

How to sort when using concat in group_concat mysql [duplicate]

This question already has an answer here:

Im in a situation where i need to sort date in concat within group_concat while my query is running fine

 SELECT 
    report.`Name`,
    GROUP_CONCAT(
      CONCAT(
        "[",
        DATE(report.Date),
        ',',
        report.ProductPrice,
        "]"
      ) 
    ) AS ProductPrice  
  FROM report
 GROUP BY report.Name ;

Aucun commentaire:

Enregistrer un commentaire