题解 | 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
select s3.emp_no,s3.salary,e.last_name,e.first_name from salaries s3 inner join employees e on e.emp_no=s3.emp_no where s3.salary in ( select s1.salary from salaries s1 inner join salaries s2 on s1.salary<s2.salary and s1.emp_no <> s2.emp_no group by s1.salary having count(s2.salary)=1) ;