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

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

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

select user_profile.device_id,
       university,
       count(question_practice_detail.device_id) question_cnt,
       sum(if(result = 'right', 1, 0))           right_question_cnt
from user_profile
         left outer join question_practice_detail
                         on user_profile.device_id = question_practice_detail.device_id and date like '2021-08%'
where university = '复旦大学'
group by university, user_profile.device_id;

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-11 11:25
点赞 评论 收藏
分享
05-27 14:57
西北大学 golang
强大的社畜在走神:27届真不用急,可以搞点项目、竞赛再沉淀沉淀,我大二的时候还在天天打游戏呢
投递华为等公司10个岗位
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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