a guest Jan 24th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- select name from employees
- where managerId in (select id from employees)
- or (managerId is null and id not in (select managerId from employees where managerId is not null))
- or 0 = (select count(id) from employees where managerId is not null)
RAW Paste Data