GROUP_CONCAT
Concatenates values from a group of rows into a single string with a separator. You can use DISTINCT, specify order, and set a custom separator.
GROUP_CONCAT([DISTINCT] expr [ORDER BY ...] [SEPARATOR str])
expr
An expression whose values will be concatenated into a string
SEPARATOR
Separator between values (comma by default)
Examples
SELECT GROUP_CONCAT(member_name)
FROM FamilyMembers;
SELECT GROUP_CONCAT(
DISTINCT STATUS
ORDER BY STATUS SEPARATOR ', '
)
FROM FamilyMembers;