Created
March 25, 2021 20:40
-
-
Save RelativeTech/eb722c70fff76ea0a71fce56ac3bc491 to your computer and use it in GitHub Desktop.
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 p.project_name, sum(w.compensation) as TotalComp | |
from project p, worker w, project_worker_map m | |
where m.project_id = p.id | |
and m.worker_id = w.id | |
and m.worker_id in ( | |
select id from worker where worker_code in('CODE-1', 'CODE-2') | |
) | |
group by p.project_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment