题解 | #大小写混乱时的筛选统计#
大小写混乱时的筛选统计
https://www.nowcoder.com/practice/81cb12931a604811ae69d332515c7734
select
t2.tag,t1.answer_cnt
from
(
select
tag,count(exam_id) answer_cnt
from examination_info
join exam_record using(exam_id)
group by tag
)t1
join
(
select
tag,count(exam_id) answer_cnt
from examination_info
join exam_record using(exam_id)
group by tag
having answer_cnt<3
)t2 on t1.tag=upper(t2.tag)
where t1.tag<>t2.tag