方法一:使用ORDER BY对入职时间进行逆序排序,结合LIMIT选取下标为2的那条记录即可。LIMIT 2,1 = LIMIT 1 OFFSET 2
SELECT * FROM employees ORDER BY hire_date DESC LIMIT 1 OFFSET 2
方法二:如果有多名并列第三的员工可以使用下面的语句
SELECT * FROM employees WHERE hire_date=(SELECT hire_date FROM employees ORDER BY hire_date DESC LIMIT 1 OFFSET 2)