This returns the same result (as far as I can tell) but does not need a join and is ANSI SQL:
select department_id,
min(case when min_comm = 1 then salary end) as worst,
max(case when max_comm = 1 then salary end) as best
from (
select department_id,
salary,
dense_rank() over (partition by department_id order by commission_pct desc) as max_comm,
dense_rank() over (partition by department_id order by commission_pct) as min_comm
from employees
) t
group by department_id
order by 1;