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

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

https://www.nowcoder.com/practice/422dcd6ae72c49c9bbec1aff90d69806

select 
t1.emp_id
,t3.emp_level
,t2.tag
from exam_record t1
left join examination_info t2
on t1.exam_id = t2.exam_id
left join emp_info  t3
on t1.emp_id = t3.emp_id
left join (
    select 
    exam_id
    ,avg(score) as avg_score
    ,avg(timestampdiff(minute,start_time,submit_time)) as avg_minute
    from  exam_record 
    group by exam_id
) t4
on t1.exam_id = t4.exam_id
where t1.score >t4.avg_score and timestampdiff(minute,start_time,submit_time) < t4.avg_minute
and t3.emp_level < 7





全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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