Created
October 28, 2023 04:57
-
-
Save rizkytegar/ce99d28e3326f30022052e680f5d7026 to your computer and use it in GitHub Desktop.
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
SELECT | |
p.nama AS 'NAMA PEGAWAI', | |
( | |
SELECT | |
m.nama | |
FROM | |
pegawai AS m | |
WHERE | |
m.id_pegawai = p.id_manager | |
) AS 'NAMA MANAGER' | |
FROM | |
`pegawai` AS p | |
WHERE | |
EXISTS( | |
SELECT | |
1 | |
FROM | |
pegawai AS m | |
WHERE | |
m.id_pegawai = p.id_manager | |
) ORDER BY | |
p.id_manager ASC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment