题解 | #大小写混乱时的筛选统计#
大小写混乱时的筛选统计
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
查看5道真题和解析