题解 | #统计每种性别的人数#

统计每种性别的人数

http://www.nowcoder.com/practice/f04189f92f8d4f6fa0f383d413af7cb8

select "male" as gender,count(profile) from user_submit where right(profile,6)<>"female"
union ALL
select "female" as gender,count(profile) from user_submit where right(profile,6)="female"
全部评论
老一辈工程师的从容与自信
点赞 回复 分享
发布于 01-03 09:57 广东
你们一群渣渣,这才是真的大佬,在已知只有两个分组的情况下,不使用分组使用Union all,避免suffle阶段,提高运算效率,好好学学
点赞 回复 分享
发布于 2022-05-17 17:24

相关推荐

人间雪:简历最好只要一页,除非你牛逼到一页都写不下了
点赞 评论 收藏
分享
评论
41
4
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务