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

分别满足两个活动的人

https://www.nowcoder.com/practice/a126cea91d7045e399b8ecdcadfb326f

#activity1要求每次考试分数都要85以上,若最低的为85,则后面每次都会比他高
select uid,"activity1" as activity
from exam_record
where year(submit_time)="2021"
group by uid
having min(score)>=85

union all

select distinct uid,"activity2" as activity
from examination_info as ei
join exam_record as er
on ei.exam_id=er.exam_id
where year(er.submit_time)="2021"
and ei.difficulty="hard"
and timestampdiff(minute,start_time,submit_time)*2<ei.duration
and er.score>80

order by uid

全部评论

相关推荐

见见123:简历没有啥问题,是这个社会有问题。因为你刚毕业,没有工作经历,现在企业都不要没有工作经历的。社会病了。
点赞 评论 收藏
分享
深夜书店vv:腾讯是这样的,去年很多走廊都加桌子当工区
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务