题解 | 完成员工考核试卷突出的非领导员工

select t2.emp_id,a.emp_level,c.tag
from ( 
    select a.emp_id,a.exam_id
    from (
        select  emp_id,exam_id,
                avg(submit_time-start_time) over(partition by exam_id) avg_time,
                avg(score) over(partition by exam_id) avg_score
        from exam_record a
    )t1
    join exam_record a
    on a.emp_id = t1.emp_id
    and a.exam_id= t1.exam_id
    where (submit_time-start_time) < avg_time
    and score > avg_score
    group by emp_id,exam_id
)t2
join emp_info  a
on a.emp_id = t2.emp_id
join examination_info c
on t2.exam_id = c.exam_id
where a.emp_level < 7
order by t2.emp_id,t2.exam_id

全部评论

相关推荐

05-26 10:24
门头沟学院 Java
qq乃乃好喝到咩噗茶:其实是对的,线上面试容易被人当野怪刷了
找工作时遇到的神仙HR
点赞 评论 收藏
分享
码农索隆:单休一个月少休息4天,一年就是48天,平时节假日,别人3天假期,单休的两天
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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