Im new to SQL. I have a table employee, it has fields eID and eLoad. In addition i have table ongoing_projects it has pID, eID (those two are primary) and eLoad. Im trying to insert a sum of all eLoads for each employee. I have an idea for pseudocode, but I cannot implement it. Any Ideas? Thank you!
For each eID in table employee
DO
UPDATE `employee` SET eload=(
SELECT SUM (eload) as eload
FROM ongoing_projects
);