题解 | #查找在职员工自入职以来的薪水涨幅情况#
查找在职员工自入职以来的薪水涨幅情况
http://www.nowcoder.com/practice/fc7344ece7294b9e98401826b94c6ea5
select b.emp_no,(b.salary-c.salary)growth
from employees a
inner join salaries b on b.emp_no=a.emp_no and b.to_date='9999-01-01'
inner join salaries c on c.emp_no=b.emp_no and a.hire_date=c.from_date
order by growth asc