题解 | #月均完成试卷数不小于3的用户爱作答的类别#

月均完成试卷数不小于3的用户爱作答的类别

http://www.nowcoder.com/practice/b1d13efcfa0c4ecea517afbdb9090845

第一次写题解做个纪念吧

select tag, count(*) as tag_cnt 
from 
examination_info
join
(
    select * from 
    exam_record
    where uid in 
    (
        select uid from
        (
            select uid, count(*) as times
            from exam_record
            where submit_time is not NULL and 
                year(start_time)=2021 and month(start_time)=9
            group by uid
            having times>=3
        )a
    )
)b
using (exam_id)
# where submit_time is not NULL and 
#     year(start_time)=2021 and month(start_time)=9
group by exam_id
order by tag_cnt desc
全部评论

相关推荐

05-07 19:10
已编辑
中国科学技术大学 C++
silly01:现在先去 momenta,8-9月去鹅找日常实习,八股文算法背好了你这随便进。不过建议补充一下后端知识,MySQL、Redis看下八股,再补个6824,加点go后台的技术栈,9月随便进大厂。CPP后端只能来WXG
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务