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

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

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

select

    ei.tag tag,

    count(tag) tag_cnt

from

    exam_record er

    join examination_info ei on er.exam_id = ei.exam_id

where

    uid in (

        SELECT

            uid

        FROM

            exam_record

        WHERE

            submit_time IS NOT NULL

        GROUP BY

            DATE_FORMAT (submit_time, '%Y%m'),

            uid

        HAVING

            count(submit_time) / count(distinct DATE_FORMAT (start_time, "%Y%m")) >= 3

    )

group by

    ei.tag

order by

    tag_cnt desc;

全部评论

相关推荐

2025-12-15 14:16
门头沟学院 Java
回家当保安:发offer的时候会背调学信网,最好不要这样。 “27届 ”和“28届以下 ”公司招聘的预期是不一样的。
实习简历求拷打
点赞 评论 收藏
分享
想run的马里奥在学...:这个学历帮你扫平百分之80的障碍,投就完了,这会找不到就等3月暑期一样能找到
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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