title: Display the Employee Name (Boss) and number of Employee (Subordinates) in SQL
body: <p>I have a table emp having  foll data:</p>
  
  <pre><code>EmpID    EmpName   MgrID 
  
  100     King        NULL
  101     Smith       100
  102     Shine       100
  103     Racy        102
  </code></pre>
  
  <p>Now i want to Display the Employee Name (Boss) and number of Employee (Subordinates) something like this</p>
  
  <pre><code>BOSS       SUBORDINATES
  </code></pre>
  
  <hr>
  
  <pre><code>BLAKE                 5
  
  CLARK                 1
  
  FORD                  1
  
  JONES                 2
  
  KING                  3
  
  SCOTT                 1
  </code></pre>
  
  <p>Please guide how to go about querying this table in SQL Server 2008.</p>
  
  <p>Attempted query:</p>
  
  <pre><code>select e.first_name as ename,m.first_name as mname from employees e,employees m where e.manager_id=m.employee_id
  </code></pre>