题解 | 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
select e.emp_no,max(s.salary) as salary,e.last_name,e.first_name from employees e left join salaries s on e.emp_no = s.emp_no where s.to_date = '9999-01-01' and s.salary = (select max(salary) as salary from salaries where to_date = '9999-01-01' and salary<(select max(salary) from salaries where to_date = '9999-01-01')) group by e.emp_no ;