콘텐츠로 이동

그룹의 값을 구분자로 연결하여 하나의 문자열로 만듭니다.

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 │
└────────────┴──────────────────────────┘