fix: forgot an inner join
This commit is contained in:
parent
fbaa1b5fc9
commit
9455039fd6
@ -166,11 +166,10 @@ ORDER BY month;
|
|||||||
|
|
||||||
-- Question 1 part 2 e)
|
-- Question 1 part 2 e)
|
||||||
SELECT Donors.gender, Donors.lastName, Donors.firstName, SUM(Donations.amount) AS total_donation_amount
|
SELECT Donors.gender, Donors.lastName, Donors.firstName, SUM(Donations.amount) AS total_donation_amount
|
||||||
FROM Donors,
|
FROM Donors
|
||||||
Donations
|
JOIN Donations on Donors.donorID = Donations.donorID
|
||||||
WHERE Donors.city = 'Brossard'
|
WHERE Donors.city = 'Brossard'
|
||||||
AND (Donations.date > '2022-01-01')
|
AND (Donations.date > '2022-01-01')
|
||||||
AND (Donations.date < '2023-12-31')
|
AND (Donations.date < '2023-12-31')
|
||||||
GROUP BY Donors.donorID, Donors.gender, Donors.lastName, Donors.firstName
|
GROUP BY Donors.donorID, Donors.gender, Donors.lastName, Donors.firstName
|
||||||
ORDER BY Donors.gender, Donors.lastName, Donors.firstName;
|
ORDER BY Donors.gender, Donors.lastName, Donors.firstName;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user