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

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

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

select up.university , qd.difficult_level ,count(qpd.question_id)/count(distinct qpd.device_id) as avg_answer_cnt 

from user_profile as up join  question_practice_detail as qpd on up.device_id = qpd.device_id 

left join question_detail as qd on qpd.question_id = qd.question_id 
 
 where up.university = '山东大学'
 group by  qd.difficult_level

select 。。(字段运算)。 from 表

join表 on 连接条件 。。

where 筛选条件

group by 分组的字段

having 聚合的运算

全部评论

相关推荐

牛客ID:561366855:期望薪资多少?难以相信这简历找不到工作。说明二本电子信息专业想对口就业非常难。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务