题解 | 查找入职员工时间升序排名的情况下的倒数第三的员工所有信息
SELECT emp_no,birth_date,first_name,last_name,gender,hire_date FROM ( SELECT *,DENSE_RANK() OVER(order by hire_date DESC) rank_hire FROM employees) AS a WHERE a.rank_hire = 3 ;
SELECT emp_no,birth_date,first_name,last_name,gender,hire_date FROM ( SELECT *,DENSE_RANK() OVER(order by hire_date DESC) rank_hire FROM employees) AS a WHERE a.rank_hire = 3 ;
相关推荐