I have only 1 table named EMPLOYEE on my database with the 3 following collumns:
Employee_Name, Employee_Salary, Department_ID
Assuming Postgres,
Try This
select e1.* from emp e1 inner join (select avg(sal) avg_sal,dept_id from emp group by dept_id) as e2 on e1.dept_id=e2.dept_id and e1.sal>e2.avg_sal