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

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

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

# select device_id 
# from user_profile
# where month(date)=8
# group by device_id



select e3.device_id,e3.university,count(question_id),sum(if(result='right',1,0))
from (
    select e1.device_id,e1.university,e2.question_id,e2.result
    from(select device_id,university from user_profile where university ='复旦大学') e1
    left join  (select * from question_practice_detail where month(question_practice_detail.date)=8 ) as e2
    on e1.device_id=e2.device_id
) e3
group by e3.device_id

全部评论

相关推荐

07-07 14:30
复旦大学 Java
遇到这种人我也不知道说啥了
无能的丈夫:但我觉得这个hr语气没什么问题啊(没有恶意
点赞 评论 收藏
分享
昨天 10:56
门头沟学院 Java
点赞 评论 收藏
分享
陆续:不可思议 竟然没那就话 那就我来吧 :你是我在牛客见到的最美的女孩
点赞 评论 收藏
分享
水墨不写bug:疑似没有上过大学
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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