排序SQL题解法
获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
http://www.nowcoder.com/questionTerminal/c1472daba75d4635b7f8540b837cc719
select
s.emp_no, s.salary, e.last_name, e.first_name
from salaries s
join employees e
on s.emp_no = e.emp_no
where s.to_date='9999-01-01'
and s.salary=
(select salary
from salaries
where to_date='9999-01-01'
group by salary
order by salary desc
limit 1,1)