using the basic hr schema I came up with:
select last_name, salary, department_id from employees o
where salary >
(select avg(salary) from employees e where e.department_id =o.department_id)
;
is there another way I could possibly do this? I was thinking about possibly using a join but I can't wrap my head around it.