SELECT
report.`Name`,
GROUP_CONCAT(
CONCAT(
"[",
DATE(report.Date) --(not working) order by DATE(report.Date) ,
',',
report.ProductPrice --(not working) order by DATE(report.ProductPrice) ,
"]"
)
) AS ProductPrice
FROM report
GROUP BY report.Name ;
钾盐
您应该在中使用它group_concat,而不是concat:
group_concat(
concat('[', date(report.Date), ',', report.ProductPrice, ']')
order by date(report.Date) desc
)
我来说两句