Skip to content

Concatenates values from a group into a single string with a separator.

func.group_concat(get_column(table, 'name'), literal(','))
func.group_concat(get_column(table, 'name'))
GROUP_CONCAT(<name>, literal(','))
SELECT department, GROUP_CONCAT(name ORDER BY name SEPARATOR ', ')
FROM employees GROUP BY department;
┌────────────┬──────────────────────────┐
│ department │ group_concat(name) │
├────────────┼──────────────────────────┤
│ Sales │ Alice, Bob, Charlie │
│ IT │ Dave, Eve │
└────────────┴──────────────────────────┘