select s1.emp_no, s2.salary-s1.salary growth
from salaries s1
inner join salaries s2 on s1.emp_no = s2.emp_no
where s2.to_date='9999-01-01'
group by s1.emp_no
order by growth asc
select s1.emp_no, s2.salary-s1.salary growth
from salaries s1
inner join salaries s2 on s1.emp_no = s2.emp_no
where s2.to_date='9999-01-01'
group by s1.emp_no
order by growth asc