GROUP_CONCAT
The GROUP_CONCAT function concatenates strings from a group into a single string with various options.
Syntax
GROUP_CONCAT(
DISTINCT expression
ORDER BY expression
SEPARATOR sep
);
Example
SELECT
GROUP_CONCAT(DISTINCT v
ORDER BY v ASC
SEPARATOR ';')
FROM
t;
The result is:
GROUP_CONCAT(DISTINCT v
ORDER BY v ASC
SEPARATOR ';')
----------------------
A;B;C