题解 | #统计每个学校各难度的用户平均刷题数#

统计每个学校各难度的用户平均刷题数

https://www.nowcoder.com/practice/5400df085a034f88b2e17941ab338ee8

select
  e1.university,
 e3.difficult_level,
  count(e2.question_id)/count(distinct(e2.device_id)) as avg_answer_cnt
from
  user_profile as e1
  left join question_practice_detail as e2 on e1.device_id = e2.device_id
  left join question_detail as e3 on e2.question_id = e3.question_id
group by
  university,
 difficult_level having avg_answer_cnt !='None'
order by avg_answer_cnt
desc

全部评论

相关推荐

MomonKa:我拿Java简历投了pdd前端也给我简历过筛了
点赞 评论 收藏
分享
02-23 00:10
湖南大学 C++
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务