题解 | #截取出年龄#

汇总各个部门当前员工的title类型的分配数目

http://www.nowcoder.com/practice/4bcb6a7d3e39423291d2f7bdbbff87f8

select
SUBSTRING_INDEX(SUBSTRING_INDEX(profile,',',-2),',',1) as age,
count(device_id) as number
From user_submit
Group by age

#subtring_index左右两边限制需要嵌套
#也可用substring(profile,12,2)
全部评论

相关推荐

点赞 评论 收藏
转发
点赞 收藏 评论
分享
牛客网
牛客企业服务