代码语言:javascript复制
select d.name "Department",e.name "Employee",Salary
from Employee e join Department d
on e.Departmentid=d.id
where
(select count(distinct(e1.salary))
from Employee e1
where e.salary<e1.salary
and e.Departmentid=e1.Departmentid)
<3