这种题的思路:

  1. 先找的入职时间排名第三的员工。

  2. 找到该员工的所有信息。

如何去重入职时间,有两种方法group by 和distinct。

select *
from employees
where hire_date = 
(
select hire_date 
from employees 
group by hire_date 
order by hire_date desc 
limit 2,1
) 
select *
from employees 
where hire_date =
(
select distinct hire_date 
from employees 
order by hire_date desc
limit 1 offset 2
)