GROUP_CONCAT change GROUP BY order

后端 未结 3 497

I have a VIEW (lots of joins) that outputs data ordered by a date ASC. Works as expected.

OUTPUT similar to:

ID date         tag         


        
3条回答
  •  太阳男子
    2021-01-18 15:39

    How about ordering your GROUP_CONCAT?

    SELECT value1, GROUP_CONCAT(value1 ORDER BY date DESC)   
    FROM table1  
    GROUP BY value1;
    

    That's the syntax you need a presume.

提交回复
热议问题