Oracle SQL Forum
May I know that how can I display the manager who is having maximum number of employees working under him?
Kindly share your valuable views here,
Thanks in advance.
SQL> select manager.ename from associate, managerwhere manager.sal> (select avg(sal) from emp whereassociate.mgr=manager.empno);
select mgr,count(empno) as total_employees from emp group by mgrhaving count(empno)=(select max(count(empno))from emp group by mgr);
Sign up for STechies
Ask Question From Our Experts
All the site contents are Copyright © www.stechies.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies. The site www.stechies.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity. Information used on this site is at your own risk.
The content on this site may not be reproduced or redistributed without the express written permission of
www.stechies.com or the content authors.