1SELECT GROUP_CONCAT(DISTINCT categories ORDER BY categories ASC SEPARATOR ' ') FROM table
2
1mysql> select Id,group_concat(Name SEPARATOR ',') as GroupConcatDemo from GroupConcatenateDemo
2 -> group by Id;
1SELECT li.client_id, group_concat(li.percentage ORDER BY li.views ASC) AS views,
2group_concat(li.percentage ORDER BY li.percentage ASC)
3FROM li GROUP BY client_id
4
1/* By deafult separe itens by "," */
2group_concat(p.nameItem) as listProdItem
3/* Used <br> to list itens one below the other in HTML page */
4group_concat(p.nameItem separator '<br>') as listProdItem