select z.emp_no,(z.salary-r.salary) growth
from (select s.emp_no,salary
from salaries s
where to_date = '9999-01-01') z
inner join
(select e.emp_no,salary
from employees e join salaries s
on e.emp_no = s.emp_no and e.hire_date = s.from_date) r
on z.emp_no = r.emp_no
order by growth;