题解 | 查找入职员工时间升序排名的情况下的倒数第三的员工所有信息

查找入职员工时间升序排名的情况下的倒数第三的员工所有信息

https://www.nowcoder.com/practice/ec1ca44c62c14ceb990c3c40def1ec6c

# select *
# from employees
# order by
#     hire_date DESC
#     limit 2,1;


select a.emp_no,a.birth_date,a.first_name,a.last_name,a.gender,a.hire_date
from (
    select emp_no,birth_date,first_name,last_name,gender,hire_date,
    dense_rank() over(order by hire_date DESC) as rk
    from employees
) as a
where a.rk =3;

全部评论

相关推荐

流浪的神仙:无恶意,算法一般好像都得9硕才能干算法太卷啦
点赞 评论 收藏
分享
asdasdasdasdas:19岁,不容易啊可能升个本会好点,现在学历歧视太严重了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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