题解 | #查找所有员工的last_name和first_name以及对应的dept_name#
获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
http://www.nowcoder.com/practice/c1472daba75d4635b7f8540b837cc719
SELECT s.emp_no,s.salary,e.last_name,e.first_name FROM employees e INNER JOIN (SELECT s1.emp_no,s1.salary FROM salaries s1,salaries s2 WHERE s1.salary < s2.salary GROUP BY s1.emp_no HAVING COUNT(s1.emp_no) = 1) as s ON e.emp_no = s.emp_no