SQL SELECT Sum values without including duplicates
问题 I have a problem in Oracle SQL that I'm trying to get my head around. I'll illustrate with an example. I have three tables that I am querying: Employees __________________________________________ | EmployeeID | Name | | 1 | John Smith | | 2 | Douglas Hoppalot | | 3 | Harry Holiday | ... InternalCosts ________________________________ | IntID | Amount | EmployeeID | | 1 | 10 | 1 | | 2 | 20 | 2 | | 3 | 30 | 1 | ... ExternalCosts ________________________________ | ExtID | Amount | EmployeeID | |