题解 | #分别满足两个活动的人#
分别满足两个活动的人
https://www.nowcoder.com/practice/a126cea91d7045e399b8ecdcadfb326f
select uid,'activity1' as activity from exam_record group by uid having min(score) >= 85 union select uid,'activity2' as activity from exam_record left join examination_info using(exam_id) where difficulty='hard' and timestampdiff(minute,start_time,submit_time)<duration*0.5 group by uid having min(score)>80 order by uid