select substring_index(profile,',','-1') gender,
// 要分割 profile 这一列;,是分隔符;负数:从右向左取一个被截取的字符串(正数:从右向左截取)
//注意: 想要截取中间部分,可以用 substring_index(substring_index())函数套娃 灵活截取
count(*) number
from user_submit
group by gender;
select substring_index(profile,',','-1') gender,
// 要分割 profile 这一列;,是分隔符;负数:从右向左取一个被截取的字符串(正数:从右向左截取)
//注意: 想要截取中间部分,可以用 substring_index(substring_index())函数套娃 灵活截取
count(*) number
from user_submit
group by gender;