题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
http://www.nowcoder.com/practice/8d2c290cc4e24403b98ca82ce45d04db
select emp_no,salary
from salaries where emp_no in
(select a.emp_no
from salaries a
inner join salaries b on a.salary < b.salary
group by a.emp_no HAVING count(a.emp_no)=1)