title: Getting managers from an oracle database
body: <p>I've got a table (<code>TB_EMP</code>) that has all the employees of the company, among others, it has the following fields:</p>
  
  <pre><code>mm_user_name
  mm_manager_id
  mm_emp_id
  mm_name
  </code></pre>
  
  <p>What I need to do, is get all the employees that have subordinates, in other words, every one, who's <code>mm_emp_id</code> is also someone else's <code>mm_manager_id</code>. I was thinking of doing a join on self, then counting the times the the employees id has come up in the table, in the field <code>mm_manager_id</code> and in the end getting the ones where this count is larger than 0. What would be the query to do this?</p>