题解 | 分析员工在不同项目中的绩效表现以及所属部门的平均绩效情况

分析员工在不同项目中的绩效表现以及所属部门的平均绩效情况

https://www.nowcoder.com/practice/20c76a1181004965a3106524fd3ab583

with t1 as(
select distinct

    department_name,
    avg(performance_score) over (
        partition by
            department_name
    ) as avg_performance_score
from
    employee_projects
    left join department_info using (employee_id)
)
select employee_id,department_name,performance_score
from employee_projects
left join department_info using(employee_id)
left join t1 using(department_name)
where performance_score > avg_performance_score


全部评论

相关推荐

饼子吃到撑:据我了解奥,我身边的护士大部分都是找关系进的医院,还掏了不少米
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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