U moet subquery's op int en ext gebruiken om de sommatie te doen en u bij de subquery's voegen.
Ik raad ook aan om expliciete JOINs te gebruiken in plaats van table, table, table
bijv.
SELECT emp.Name, int.Amount AS InternalCostTotal, ext.Amount AS ExternalCostTotal
FROM Employees emp
JOIN (
SELECT EmployeeID, SUM(Amount) AS Amount
FROM InternalCosts
GROUP BY EmployeeID
) int ON emp.EmployeeId = int.EmployeeID
JOIN (
SELECT EmployeeID, SUM(Amount) AS Amount
FROM ExternalCosts
GROUP BY EmployeeID
) ext ON emp.EmployeeId = ext.EmployeeID