select age, count(device_id) as number from ( select device_id, SUBSTRING_INDEX(SUBSTRING_INDEX(profile,',',-2),',',1) as age from user_submit ) as a group by age order by age desc SUBSTRING_INDEX(profile,',',-2):取出倒数第二个“,”所在位置后面的子字符串,返回还是一个字符串类型cast(x,数字类型A):类型转换https://zhuanlan.zhihu.com/p/1199779...