题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
http://www.nowcoder.com/practice/c1472daba75d4635b7f8540b837cc719
这题感觉没啥意义啊...
硬不让用order,那就把第二大的薪水写出来当成条件filter好了
select emp.emp_no, sal.salary, emp.last_name, emp.first_name from employees emp left join salaries sal on emp.emp_no = sal.emp_no where sal.salary= (select max(salary) from salaries where salary<(select max(salary) from salaries) );