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

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

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 天津

相关推荐

不愿透露姓名的神秘牛友
04-08 05:32
点赞 评论 收藏
分享
牛客773130651号:巨佬,简历模板换成上下的,左右的很烦,hr看着不爽。。。科大随便乱杀,建议能保研就保研,不行也得考一下 ,985硕去干算法,比开发强多了。开发许多双非都能搞,学历优势用不上,算法有门槛
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务