题解 | #大小写混乱时的筛选统计#

大小写混乱时的筛选统计

https://www.nowcoder.com/practice/81cb12931a604811ae69d332515c7734

select
    low.tag,
    up.answer_cnt
from
    (
        select
            er.exam_id,
            tag,
            count(start_time) as answer_cnt
        from
            examination_info ei,
            exam_record er
        where
            ei.exam_id = er.exam_id
        group by
            tag,
            er.exam_id
        having
            answer_cnt < 3
            and tag != upper(tag)
    ) low,
(
        select
            tag,
            count(start_time) as answer_cnt
        from
            examination_info ei,
            exam_record er
        where
            ei.exam_id = er.exam_id
        group by
            tag
    ) up
where upper(low.tag) = up.tag

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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