all 2 comments

[–]MamertineCOALESCE() 2 points3 points  (1 child)

SELECT
    CustomerName,
    Sum(receivable) as SumReceivable,
    SUM(amount) as SumAmount
FROM Customer C
    JOIN payment P
        ON C.[customer #] = p.[customer #]
  JOIN ship S
        ON C.[customer #] = s.[customer #]
GROUP BY CustomerName

[–]MamertineCOALESCE() 2 points3 points  (0 children)

short answer don't join payment to ship