select substring_index(profile,',',-1) as gender, count(device_id) from user_submit group by gender; /*substring_index('www.baidu.com', '.', -2) 截取第二个 '.' (倒数)之后的所有字符 SELECT substring_index('www.baidu.com', '.', -2) 结果:baidu.com 9、SUBSTR(name, 1, CHAR_LENGTH(name)-3) 截取name字段,取除name字段后三位的所有字符 SELECT...