SELECT e.ID, e.[Name], COUNT(m.ID) FROM EMP e JOIN EMP m ON e.ID=m.ManagerID GROUP BY e.ID, e.[Name]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)