MySQL group_concat distinto
SELECT GROUP_CONCAT(DISTINCT categories ORDER BY categories ASC SEPARATOR ' ') FROM table
Drakonkat
SELECT GROUP_CONCAT(DISTINCT categories ORDER BY categories ASC SEPARATOR ' ') FROM table
mysql> select Id,group_concat(Name SEPARATOR ',') as GroupConcatDemo from GroupConcatenateDemo
-> group by Id;
GROUP_CONCAT(artists.artistname SEPARATOR '----')
GROUP_CONCAT(eng_category_name SEPARATOR ',') as eng_category_name
SELECT
CONCAT(`Name`, ':', GROUP_CONCAT(`Value` SEPARATOR ',')) AS `Name`
FROM table
GROUP BY `Name`
//returns the concatenated string from multiple rows into a single string
SELECT emp_id, emp_fname, emp_lname, dept_id,
GROUP_CONCAT(designation) as "designation" FROM employee group by emp_id;