题解 | #所有用户对高难度题目的刷题数#

所有用户对高难度题目的刷题数

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

select a.device_id,
    count(if (c.difficult_level = 'hard', 1, null)) as question_cnt
from
    user_profile a
    left join question_practice_detail b on a.device_id = b.device_id
    left join question_detail c on b.question_id = c.question_id
group by
    device_id
order by
    question_cnt

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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