title: SQL Query to get recursive count of employees under each manager
body: <p>I'm looking for a SQL query to get the recursive count of <code>Employee</code> under the each manager or some managers from other table.</p>
  <p>Table structures are:</p>
  <p><strong>Emp_Table</strong></p>
  <pre><code>Emp_id Manager_id
  1         1
  2         1
  3         1
  4         3
  5         3
  6         5
  7         5
  8         7
  9         7
  10        7
  </code></pre>
  <p><strong>Execute</strong> table:</p>
  <p>This table is nothing but selected managers are available here. I need to get the count of each employee under this manager</p>
  <pre><code>Manager_id
       1
       4
       7
       8
  </code></pre>
  <p>I'm looking for the following output</p>
  <pre><code>Manager_ID   Count_of_Employees
       1             9
       4             0
       7             3 
       8             0
  </code></pre>
  <p>Please note your answers give the direct reporting employee count only for each manager I'm getting. But I'm looking for recursive employee reports with managers. In my above example as per your query I will get for the Manager_id 1 and employee count is 3 but I'm looking for the output is 9. Thanks in advance!</p>
  <p>Thanks for all your reply. I finally got the Query. Please find my answer.</p>