化用SQL137的方法
select s.emp_no,sum(case when from_date=hire_date then -salary
                 when to_date='9999-01-01' then salary end) as growth
from salaries as s 
join employees as e 
on s.emp_no=e.emp_no
group by emp_no
having max(to_date)='9999-01-01'
order by growth