selects.emp_no, s.salary, e.last_name, e.first_namefrom salaries sjoin employees eon s.emp_no = e.emp_nowhere s.to_date='9999-01-01'and s.salary=(select salaryfrom salarieswhere to_date='9999-01-01'group by salaryorder by salary desclimit 1,1)