Querying for "inactive" donors

  • Thread starter Thread starter K. Georgiadis
  • Start date Start date
K

K. Georgiadis

I have in front of me a large data base for a charitable
organization, organized in two tables: 1) personal
information of supporters/donors and 2) donations by each
donor, showing date of each check, amount and designated
use of funds.

I need to query the data base for those donors who have
NOT written any checks since January 1, 2001.

Can someone tell me how to do that?

Thanks in advance.

KG
 
K. Georgiadis said:
I have in front of me a large data base for a charitable
organization, organized in two tables: 1) personal
information of supporters/donors and 2) donations by each
donor, showing date of each check, amount and designated
use of funds.

I need to query the data base for those donors who have
NOT written any checks since January 1, 2001.

Can someone tell me how to do that?

Without the table deals I can't be precise, but a query with SQL along
these lines should so the job:

SELECT * FROM Donors
WHERE NOT EXISTS
(SELECT DonorID FROM Donations
WHERE Donations.DonorID = Donors.DonorID
AND DonationDate >= #1/1/2001#);
 
I have in front of me a large data base for a charitable
organization, organized in two tables: 1) personal
information of supporters/donors and 2) donations by each
donor, showing date of each check, amount and designated
use of funds.

I need to query the data base for those donors who have
NOT written any checks since January 1, 2001.

A Subquery will do this:

SELECT <some fields>
FROM Donors
WHERE NOT EXISTS
(SELECT DonorID FROM Donations
WHERE Donations.DonorID = Donors.DonorID
AND DonationDate > #1/1/2001#)

For more flexibility, if you want all donors who haven't donated in
the past three years say, use a criterion of

DateSerial(Year(Date() - 2, 1, 1)
 
SELECT <some fields>
FROM Donors
WHERE NOT EXISTS
(SELECT DonorID FROM Donations
WHERE Donations.DonorID = Donors.DonorID
AND DonationDate > #1/1/2001#)

LOL - You picked the same example names as I did!
 
Back
Top