用rank() over() 将表进行排名,题目要求倒数第三,也就是 倒叙时间排列 正数第三
解题代码:
SELECT emp_no, birth_date, first_name, last_name, gender, hire_date from (select * , rank() over(order by hire_date desc) as ranks FROM employees) a where a.ranks=3
用rank() over() 将表进行排名,题目要求倒数第三,也就是 倒叙时间排列 正数第三
解题代码:
SELECT emp_no, birth_date, first_name, last_name, gender, hire_date from (select * , rank() over(order by hire_date desc) as ranks FROM employees) a where a.ranks=3