三种解法

题解一 假设不存在相同入职时间的员工 直接倒叙排序 取第三名

ps.这种可以通过官方示例

select * from employees order by hire_date desc limit 2,1

题解二 存在相同入职时间的员工 先取第三名的入职时间 再比较

子查询
SELECT * FROM employees WHERE hire_date = (SELECT hire_date from employees ORDER BY hire_date DESC LIMIT 2, 1);
or 关联查询
SELECT t1.* FROM employees t1 JOIN (SELECT hire_date from employees ORDER BY hire_date DESC LIMIT 2, 1)t2
ON t1.hire_date = t2.hire_date;

题解三 存在相同入职时间的员工,另一种解答思路:

利用group by 倒叙第三名 即比当前员工入职时间迟的员工应该有2个

select t1.* from employees t1
left join employees t2 on t1.hire_date < t2.hire_date
GROUP BY t1.emp_no,t1.hire_date
having count(t2.emp_no) = 2;