group_concat mysql
snippet in sql

mysql group_concat distinct

user4920

SELECT GROUP_CONCAT(DISTINCT categories ORDER BY categories ASC SEPARATOR ' ') FROM table

mysql separator

user5698

GROUP_CONCAT(artists.artistname SEPARATOR '----')

group_concat sql server

user1682

STRING_AGG ( expression, separator ) [ <order_clause> ]

<order_clause> ::=   
    WITHIN GROUP ( ORDER BY <order_by_expression_list> [ ASC | DESC ] )
    SELECT STRING_AGG(Genre, ',') AS Result
FROM Genres;
Result:

Result                                      
--------------------------------------------
Rock,Jazz,Country,Pop,Blues,Hip Hop,Rap,Punk

group_concat mysql

user2645

GROUP_CONCAT(expr);