0 votes
in Oracle by
You want to create a list of managers and the number of employees reporting to them. Write an Oracle SQL query to retrieve managers’ names and the count of employees reporting to each manager.

1 Answer

0 votes
by
SELECT m.employee_name AS manager_name, COUNT(e.employee_id) AS num_employees

FROM employees e

JOIN employees m ON e.manager_id = m.employee_id

GROUP BY m.employee_name;

Related questions

0 votes
asked Jan 21 in Oracle by rajeshsharma
0 votes
asked Nov 8, 2021 in Sql by rajeshsharma
...