# select # substring_index(substring_index(profile,',',-2),',',1) age, # count(device_id) number # from user_submit # group by age select substr(profile,locate('kg',profile)+3 ,length(substring_index(profile,'kg',-1))-2-length(substring_index(profile,',',-1))) age, count(device_id) number from user_...