题解 | #分别满足两个活动的人#

分别满足两个活动的人

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

全部评论

相关推荐

我冲冲冲冲冲:泪目了,好想选自己想选的答案啊
点赞 评论 收藏
分享
牛客146600443号:92的能看上这3k,5k在搞笑呢
点赞 评论 收藏
分享
2 收藏 评论
分享
牛客网
牛客企业服务