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

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

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

with t1 as(
select 
    t1.emp_id,
    exam_id,
    emp_level,
    submit_time-start_time as answer_time,
    score
from emp_info t1 inner join exam_record t2 on t1.emp_id = t2.emp_id 
where emp_level < 7
),
t2 as(
select 
    exam_id,
    avg(submit_time-start_time) as avg_answer_time,
    avg(score) as avg_score
from exam_record 
group by exam_id
),t3 as(
select 
    emp_id,
    t1.exam_id,
    emp_level,
    answer_time,
    score,
    avg_answer_time,
    avg_score 
from t1 left join t2 on t1.exam_id=t2.exam_id
),
t4 as(
select 
    emp_id,
    exam_id ,
    emp_level
from t3
where answer_time < avg_answer_time and score > avg_score
)
select 
    emp_id,
    emp_level,
    tag as exam_tag
from t4 inner join examination_info on t4.exam_id = examination_info.exam_id

全部评论

相关推荐

小浪_Coding:1. 个人技能排版太乱, 写的技术栈太浅了, 跟测试,自动化相关的太少; 2. 项目开发类的太简单没有亮点, 算法类的项目建议只放一个,最好有自动化,CI/CD, pipline的项目, 需要更换; 3.整体排版需要优化, SOOB打招呼都需要注意等.
我的简历长这样
点赞 评论 收藏
分享
牛客44320985...:你的当务之急是把这个糖的要死的沟槽ide主题改了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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