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

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

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

select
    up.university,
    qd.difficult_level,
	#round函数四舍五入取后4为小数,
    round(count(qpd.question_id) / count(distinct qpd.device_id),4) as avg_answer_cnt
from 
    user_profile as up,
    question_practice_detail as qpd,
    question_detail as qd
where
    up.device_id = qpd.device_id and qpd.question_id = qd.question_id
group by 
    up.university,qd.difficult_level;

全部评论

相关推荐

03-03 19:02
已编辑
东华理工大学 Node.js
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
03-19 10:38
实力求职者:真的绷不住了,第一张霸总人设,第二张求生欲拉满
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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