Advertisement
apl-mhd

Left Join

Jul 20th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.17 KB | None | 0 0
  1. SELECT e.FIRST_NAME, COUNT( man.MANAGER_ID)
  2. FROM employees e
  3. LEFT JOIN employees man ON e.EMPLOYEE_ID = man.MANAGER_ID
  4.  
  5. GROUP BY e.FIRST_NAME
  6.  
  7. ORDER BY e.FIRST_NAME ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement