fix: forgot an inner join

This commit is contained in:
minhtrannhat 2024-07-10 14:58:01 -04:00
parent fbaa1b5fc9
commit 9455039fd6
Signed by: minhtrannhat
GPG Key ID: E13CFA85C53F8062

View File

@ -166,11 +166,10 @@ ORDER BY month;
-- Question 1 part 2 e)
SELECT Donors.gender, Donors.lastName, Donors.firstName, SUM(Donations.amount) AS total_donation_amount
FROM Donors,
Donations
FROM Donors
JOIN Donations on Donors.donorID = Donations.donorID
WHERE Donors.city = 'Brossard'
AND (Donations.date > '2022-01-01')
AND (Donations.date < '2023-12-31')
GROUP BY Donors.donorID, Donors.gender, Donors.lastName, Donors.firstName
ORDER BY Donors.gender, Donors.lastName, Donors.firstName;