select substring_index(substring_index(profile,',',3),',',-1) as age,count(*) as number from user_submit group by age substring_index(FIELD, sep, n)可以将字段FIELD按照sep分隔: (1).当n大于0时取第n个分隔符(n从1开始)之前的全部内容; (2).当n小于0时取倒数第n个分隔符(n从-1开始)之后的全部内容;SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(profile, ',', -2), ',', ...