原来GROUP_CONCAT中,是支持GROUP内排序的,自己好土。。
SELECT student_name,
GROUP_CONCAT(DISTINCT test_score ORDER BY test_score DESC SEPARATOR ' ')
FROM student
GROUP BY student_name;[......]
MySQL中GROUP_CONCAT中排序
Leave a reply
原来GROUP_CONCAT中,是支持GROUP内排序的,自己好土。。
SELECT student_name,
GROUP_CONCAT(DISTINCT test_score ORDER BY test_score DESC SEPARATOR ' ')
FROM student
GROUP BY student_name;[......]