题解 | 统计每个用户的平均刷题数

统计每个用户的平均刷题数

https://www.nowcoder.com/practice/f4714f7529404679b7f8909c96299ac4

select 
    up.university,
    qp.difficult_level,
    round(count(qpd.question_id)/count(distinct qpd.device_id),4 ) as avg_answer_cnt
from question_practice_detail as qpd 
left join user_profile as up on up.device_id=qpd.device_id
left join question_detail as qp on qp.question_id=qpd.question_id
where up.university='山东大学'
group by university,difficult_level


全部评论
where 已经过滤了山东大学 分组就不需要对大学分组了
1 回复 分享
发布于 03-07 16:09 上海
点赞 回复 分享
发布于 03-06 16:08 天津

相关推荐

10-29 18:20
济南大学 Java
用微笑面对困难:他不是人事吗,怎么净特么不干人事
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
12-18 11:21
优秀的大熊猫在okr...:叫你朋友入职保安,你再去送外卖,一个从商,一个从政,你们两联手无敌了,睁开你的眼睛看看,现在是谁说了算(校长在背后瑟瑟发抖)
选实习,你更看重哪方面?
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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