select * from student e where salary > (select avg(salary) from student f where f.dep=e.dep);
select * from student where salary > (select avg(salary) from student e where dep=e.dep);
select *from studentwhere salary > (select avg(salary) from student e where dep=e.dep);
select *from studentwhere salary > (select avg(salary) from student e where e.dep=e.dep); -- The subquery is comapring the value of dep to itself
select *from student ewhere salary > (select avg(salary) from student f where f.dep = e.dep);
select *from studentwhere salary > (select avg(salary) from student e where dep = e.dep);