Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Write only the SQL statement that solves the problem and nothing else.
- INSERT INTO employees(id, managerId, name) VALUES(3, 2, 'barbosa');
- select (SELECT name FROM employees WHERE managerID IS NULL) as 'employee', (SELECT name FROM employees WHERE managerID IS NOT NULL) as 'manager'
- -- Explanation:
- -- In this example.
- -- John is Mike's manager. Mike does not manage anyone.
- -- Mike is the only employee who does not manage anyone.
Add Comment
Please, Sign In to add comment