使用group_concat函数来实现功能
This function returns a string result with the concatenated non-NULL values from a group. It returns NULL if there are no non-NULL values.
--Mysql官方文档
mysql> SELECT student_name,
GROUP_CONCAT(test_score)
FROM student
GROUP BY student_name;
一定要加上group by条件,否则不规范