select substring_index(substring_index(profile,',',-2),',',1) as age, count(*) as number from user_submit group by age 也可以是 SUBSTR(str, pos, len) str:要截取的字符串或字段名pos:起始位置(从 1 开始;负数表示从右往左数)len:截取的长度(可选)SUBSTR(profile,12,2) as age 从第12字段截取两个字符