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

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

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


全部评论

相关推荐

迷茫的大四🐶:那你问他上班之后老实了没
点赞 评论 收藏
分享
10-22 12:34
测试工程师
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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