题解 | #统计复旦用户8月练题情况#

统计复旦用户8月练题情况

https://www.nowcoder.com/practice/53235096538a456b9220fce120c062b3

select device_id,
       university,
       (select count(id)
        from (select qpd.id
              from question_practice_detail qpd
              where device_id = up.device_id
                and MONTH(date) = 8) var)     as question_cnt,
       (select count(*)
        from (select *
              from question_practice_detail as qpd
              where device_id = up.device_id
                and result = 'right') as var) as right_question_cnt
from user_profile up
where university = '复旦大学';

全部评论

相关推荐

爱喝奶茶的垂耳兔拥抱太阳:感觉项目和实习没有技术亮点和难点,单纯说了自己干了啥
点赞 评论 收藏
分享
评论
2
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务