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

大小写混乱时的筛选统计

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

with
    a as ( 
        select
            tag,
            count(start_time) answer_cnt
        from
            examination_info i,
            exam_record r
        where
            i.exam_id = r.exam_id
        group by
            tag
    )
select
    a.tag tag,
    b.answer_cnt
from
    a,
    a b
where
    upper(a.tag) = b.tag
    and a.tag != b.tag
    and a.answer_cnt < 3;

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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