GROUP_CONCAT

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

Analyze Syntax

func.group_concat(get_column(table, 'name'), literal(','))

Analyze Examples

func.group_concat(get_column(table, 'name'))

SQL Syntax

GROUP_CONCAT(<name>, literal(','))

SQL Examples

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