题解 | #分别满足两个活动的人#
分别满足两个活动的人
https://www.nowcoder.com/practice/a126cea91d7045e399b8ecdcadfb326f
select
distinct
uid,
'activity1' activity
from
exam_record
where
score is not null
and uid not in (
select uid
from exam_record
where score<85
)
union all
select
distinct
uid,
'activity2' activity
from
exam_record a,
examination_info b
where a.exam_id=b.exam_id
and b.difficulty='hard'
and a.score>80
and TIMESTAMPDIFF(SECOND,start_time,submit_time)<=1800
order by uid
查看19道真题和解析