SELECT a.emp_no, salary, from_date, a.to_date, a.dept_no from (select * from dept_manager) a inner join (select * from salaries) b on a.emp_no = b.emp_no order by a.emp_no