MYSQL:

select e.emp_no emp_no, s.salary salary, e.last_name last_name, e.first_name first_name
from employees e join salaries s 
on e.emp_no = s.emp_no
where s.salary =
(select max(s2.salary)
from salaries s2
where
s2.salary < (select max(salary) from salaries));

 

posted on 2021-10-12 15:29  Sempron2800+  阅读(23)  评论(0编辑  收藏  举报