I have an aid donation database which contains details of all aid donations since 2009. Two similar queries list donations by item type and total for each year; the difference between the two queries is that one lists donations to persons aged 60+ only. Both queries work fine when run separately.
Sample outputs from separate runs:
I want to produce a report showing a combined output showing the total of each item per year along with the number of those given to the pensioners on the same row; ie:
item type; year of donation; number of donations (all); value of donations (all); donations to 60+; value to 60+
query is coded as
Code:
SELECT statsACPROS124.Item, statsACPROS124.ByYear, statsACPROS124.ItemCount AS CountAll, statsACPROS124.SumOfValoare AS ValueAll, [statsACPROS124+60].ItemCount AS Count60, [statsACPROS124+60].SumOfValoare AS Value60
FROM statsACPROS124 LEFT JOIN [statsACPROS124+60] ON statsACPROS124.Item = [statsACPROS124+60].Item;
However, this produces duplicated records - 190 in place of the 36 expected.
In acoustic terms, I am getting feedback. What did I miss?