GROUP_CONCAT
Combines values into a single string.
sql
1SELECT course, GROUP_CONCAT(name) AS students
2FROM students
3GROUP BY course;| course | students |
|---|---|
| Python | Alice,Bob,Carol |
| Ruby | David,Eve |

Combines values into a single string.
1SELECT course, GROUP_CONCAT(name) AS students
2FROM students
3GROUP BY course;| course | students |
|---|---|
| Python | Alice,Bob,Carol |
| Ruby | David,Eve |