题解 | #计算25岁以上和以下的用户数量#

计算25岁以上和以下的用户数量

http://www.nowcoder.com/practice/30f9f470390a4a8a8dd3b8e1f8c7a9fa

select '25岁以下',count(id) from user_profile where age is null||age<25
union 
select '25岁及以上',count(id) from user_profile where age>=25;
//注意select直接对一个常量,返回的就是这个常量
全部评论

相关推荐

Debug_EVE:简历不要做成左右两页的,尽量做成上下一页
点赞 评论 收藏
分享
评论
3
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务