题解 | #统计复旦用户8月练题情况#

统计复旦用户8月练题情况

https://www.nowcoder.com/practice/53235096538a456b9220fce120c062b3

SELECT A.device_id,A.university,
IF(B.question_cnt is null , 0, B.question_cnt),
IF(B.right_question_cnt is null , 0,B.right_question_cnt)
From user_profile A left join
(select device_id,count(device_id) as question_cnt,sum(Case result when 'wrong' then 0 else 1 end ) as right_question_cnt From question_practice_detail where month(date)=8 Group By device_id ) AS B
ON A.device_id=B.device_id
where university ='复旦大学'

全部评论

相关推荐

12-15 14:16
门头沟学院 Java
回家当保安:发offer的时候会背调学信网,最好不要这样。 “27届 ”和“28届以下 ”公司招聘的预期是不一样的。
实习简历求拷打
点赞 评论 收藏
分享
12-20 11:21
复旦大学 Java
点赞 评论 收藏
分享
评论
点赞
2
分享

创作者周榜

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