题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
http://www.nowcoder.com/practice/8d2c290cc4e24403b98ca82ce45d04db
子查询找出第二多薪水,主查询选出所有薪水等于第二多薪水的员工并排序
select emp_no, salary from salaries where to_date='9999-01-01' and salary = (select salary from salaries where to_date='9999-01-01' order by salary DESC limit 1 OFFSET 1) order by emp_no;