I
Irina
Guest
I have to link a table that contains payments with a table that contains events for each contract. However, every time I try to display the sum of all the payments, all the payments are repeated as many times as there are events. e.g. if there are two payments: 100 and 50 and two events, the query will return 300 as the sum (instead of 150).
The query looks like this:
SELECT Sum(Payments.AMOUNT) AS SumOfAMOUNT
FROM Payments INNER JOIN Events ON Payments.KNUM = Events.Knum
WHERE (((Payments.KNUM)="11111"));
How can I get the sum to reflect an accurate amount independent of the number of events (but still include the Events table in my query)?
Thank you
The query looks like this:
SELECT Sum(Payments.AMOUNT) AS SumOfAMOUNT
FROM Payments INNER JOIN Events ON Payments.KNUM = Events.Knum
WHERE (((Payments.KNUM)="11111"));
How can I get the sum to reflect an accurate amount independent of the number of events (but still include the Events table in my query)?
Thank you