Skip to main content
Admissions guidance, study banks, and career tools โ€” get started on Shalyam

Group Concatenation of Names

For each department return the employee names as a single comma-separated string in alphabetical order.

Table schema

Employees(id INT PRIMARY KEY, name VARCHAR(50), department_id INT)

Sample data

id | name | department_id
1 | Zoe | 1
2 | Adam | 1
3 | Mia | 2

Discussion

No discussions yet.

Rewards ยท v2.1

Join Shalyam Newsletter

Get exclusive insights with every issue: education, research and innovation news.

One email a week. Unsubscribe any time.