select distinct employees.emp_no, salaries.salary from employees, salaries
where employees.emp_no=salaries.emp_no
and employees.hire_date between salaries.from_date and salaries.to_date
order by employees.emp_no desc;