题解 | countif用法

计算男生人数以及平均GPA

http://www.nowcoder.com/practice/7d9a7b2d6b4241dbb5e5066d7549ca01

select COUNT(if(t.gender ='male', true,1)), round(avg(t.gpa),1) from
                # 到小数点后一位
(select gender,gpa from user_profile
 where gender = 'male') t
count(if(xx,true,1)) 写法要记住
全部评论

相关推荐

AAA专业长城贴瓷砖刘大爷:这样的简历我会直接丢进垃圾桶,花里胡哨的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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