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

select
    a.emp_id as emp_id,
    emp_level,
    tag as exam_tag
from
    emp_info a,
    examination_info b,
    (
        select
            *,
            avg(timestampdiff (second, start_time, submit_time)) over (
                partition by
                    exam_id
            ) as avg_time,
            avg(score) over (
                partition by
                    exam_id
            ) as avg_score
        from
            exam_record
    ) c
where
    a.emp_id = c.emp_id
    and b.exam_id = c.exam_id
    and timestampdiff (second, start_time, submit_time) < avg_time
    and score > avg_score
    and emp_level < 7
group by
    b.exam_id,
    tag,
    a.emp_id
order by
    a.emp_id,
    b.exam_id

全部评论

相关推荐

能干的三文鱼刷了10...:公司可能有弄嵌入式需要会画pcb的需求,而且pcb能快速直观看出一个人某方面的实力。看看是否有面试资格。问你问题也能ai出来,pcb这东西能作假概率不高
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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