How to display those managers name whose salary is more than average salary of his employee?
SELECT DISTINCT emp.enameFROM emp, emp eWHERE e.sal < (SELECT AVG(emp.sal) FROM emp WHERE emp.empno=e.mgr GROUP BY emp.ename )AND emp.empno=e.mgr;