SELECT e.emp_no, ss.maxSalary, e.last_name, e.first_nameFROM employees AS eINNER JOIN ( SELECT s.eNo AS empNo, MAX(s.sal) AS maxSalary FROM ( SELECT emp_no AS eNo , salary AS sal, from_date, to_date FROM salaries WHERE salary NOT IN (SELECT MAX(salary) ...