I have Employees table
I created query to get number of employees in the department and manager per employee.
FROM EMPLOYEES e
JOIN (SELECT DEPARTMENT_ID, COUNT(EMPLOYEE_ID) as EmpCount
GROUP BY DEPARTMENT_ID) d
ON e.DEPARTMENT_ID = d.DEPARTMENT_ID
How to get Manager_Name instead Manader_ID which is part of employees?