题解 | #查找所有员工自入职以来的薪水涨幅情况#
查找所有员工自入职以来的薪水涨幅情况
http://www.nowcoder.com/practice/fc7344ece7294b9e98401826b94c6ea5
select emp_no, s_1-s_0 as growth from (select s1.emp_no, salary as s_1 from salaries as s1 where to_date = '9999-01-01') as table0
left join(
select s2.emp_no, salary as s_0 from salaries as s2 where from_date in (select hire_date from employees)
) as table1
using(emp_no)
order by growth;