select e.emp_no, t1.salary, e.last_name, e.first_name 
from 
# 表一,找第二大的工资。具体表现为排除最大数之后重排序的的最大数。
(select max(s1.salary) salary from salaries s1
where s1.salary < (select max(s1.salary) from salaries s1)) t1
# 表二, 将次大的工资和工资表进行自连接,这时候 emp_no 就出现了
join salaries s2 on s2.salary = t1.salary
# 表三,和员工表连接,用于取出 name
join employees e on e.emp_no = s2.emp_no