GROUP_CONCAT 增加序号
SELECT group_concat( concat( @j := IF ( @p = s.semester_id, @j + 1, IF ( @p := s.semester_id, 1, 1 ) ), '.', s.item ) SEPARATOR ', ' ) FirstName, s.* FROM scd_cost_charge_item s WHERE s.sys_state = 0 GROUP BY s.semester_id;
标签:GROUP,item,semester,序号,id,CONCAT From: https://www.cnblogs.com/RedOrange/p/17091703.html