daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Jan 24th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select name from employees
  2. where managerId in (select id from employees)
  3. or (managerId is null and id not in (select managerId from employees where managerId is not null))
  4. or 0 = (select count(id) from employees where managerId is not null)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top