-
-
Save xmeng1/e33401c6f1f6b3baa50da916418a5fa4 to your computer and use it in GitHub Desktop.
The following data definition defines an organization's employee hierarchy. An employee is a manager if any other employee has their managerId set to the first employees id. An employee who is a manager may or may not also have a manager. TABLE employees id INTEGER NOT NULL PRIMARY KEY managerId INTEGER REFERENCES employees(id) name VARCHAR(30) …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT name FROM employees | |
WHERE id NOT IN (SELECT managerId FROM employees WHERE managerId IS NOT NULL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment