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

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

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

select
    university,
    difficult_level,
    count(question_practice_detail.question_id) / count(distinct (question_practice_detail.device_id))
from
    user_profile,
    question_practice_detail,
    question_detail
where
    user_profile.device_id = question_practice_detail.device_id
    and question_practice_detail.question_id = question_detail.question_id and university = '山东大学'
group by
    university,
    difficult_level

不太习惯对表重命名,大佬指导会不会影响查询速度,还是单纯的美观

#多表联查#
全部评论

相关推荐

爱喝奶茶的垂耳兔拥抱太阳:感觉项目和实习没有技术亮点和难点,单纯说了自己干了啥
点赞 评论 收藏
分享
本人一直追求WLB,对大小周深恶痛疾,刷到小红书说取消大小周大喜,看来跳槽的选择又多一个了
一枚大铁锤:至于冲不冲小红书,这是个问题,我先声明我不是这方面的专家,我觉得这件事还是要慎重评论,你问我为什么不给出回答,因为我一开始就说了,我不是这方面的专家
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务