Guest User

Untitled

a guest
Jan 17th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. -- Write only the SQL statement that solves the problem and nothing else.
  2. INSERT INTO employees(id, managerId, name) VALUES(3, 2, 'barbosa');
  3.  
  4. select (SELECT name FROM employees WHERE managerID IS NULL) as 'employee', (SELECT name FROM employees WHERE managerID IS NOT NULL) as 'manager'
  5.  
  6.  
  7. -- Explanation:
  8. -- In this example.
  9. -- John is Mike's manager. Mike does not manage anyone.
  10. -- Mike is the only employee who does not manage anyone.
Add Comment
Please, Sign In to add comment