Advertisement
festinko

Untitled

Dec 5th, 2022
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.18 KB | None | 0 0
  1.  
  2. SELECT
  3.  e1.managerId,
  4.  COUNT(e1.id)
  5.  
  6.  
  7. FROM
  8.   employees e1
  9.  
  10. LEFT JOIN
  11.   employees e2
  12.  
  13. ON e1.managerId = e2.id
  14.  
  15. GROUP BY
  16.   e1.managerId
  17.  
  18. HAVING
  19.  
  20.  
  21.  
  22. limit 100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement