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

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

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

select
  university,
  difficult_level,
  sum(date) / count(university)
from
  user_profile a,
  (
    select
      device_id,
      count(b.question_id) date,
      difficult_level
    from
      question_detail a,
      question_practice_detail b
    where
      a.question_id = b.question_id
    group by
      device_id,
      difficult_level
  ) b
where
  a.device_id = b.device_id
group by
  university,
  b.difficult_level
order by
  university;
全部评论

相关推荐

数学转码崽:一直给我推,投了又不理,理了又秒挂
点赞 评论 收藏
分享
bLanK的小号:建议自己写一个比较新颖的项目,比如思维导图,在线文档,仿造postman,仿造一个组件库
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务