Last active
January 7, 2019 16:21
-
-
Save candrasetiadi/865a12208332cde0054fc478bb8fe5ab to your computer and use it in GitHub Desktop.
candra-jabar-digital-service
This file contains 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
-- Write only the SQL statement that solves the problem and nothing else. | |
SELECT S.name | |
FROM | |
(SELECT a.id, a.managerId, a.name FROM employees AS a) AS S | |
LEFT JOIN | |
(SELECT e.id, e.managerId, e.name FROM employees as e WHERE e.managerId IS NOT NULL) AS T | |
ON S.id = T.managerId | |
WHERE T.managerId IS NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment