无
emp_no | salary | last_name | first_name |
---|---|---|---|
10009 | 94409 | Peac | Sumant |
SQL:
select e.emp_no,max(s.salary) as salary,e.last_name,e.first_name from salaries s,employees e on e.emp_no=s.emp_no where s.salary not in(select max(salary) from salaries where to_date=‘9999-01-01‘) and s.to_date=‘9999-01-01‘
select 与max函数相互结合
SQL-18 查找当前薪水(to_date='9999-01-01')排名第二多的员工编号emp_no、薪水salary、last_name以及first_name,不准使用order by
原文:https://www.cnblogs.com/kexiblog/p/10674853.html