TntConnect TM
Helping you build powerful connections for a lifetime of ministry...

How can I lookup all contacts who gave a certain number of gifts within a specific date range?

TNT.tips from Bob!

Table of Contents

It is our pleasure to provide this software free of charge to help you in your ministry.  We're so thankful for our partners who make this possible!

About TntWare

Page Details

First published by:
Troy Wolbrink
on 2 Dec 2009
Last revision by:
Troy Wolbrink
on 2 Dec 2009
1 person found this article useful.

100% of people found this useful
How can I lookup all contacts who gave a certain number of gifts within a specific date range?

Filed under: , [Edit Tags]

Custom lookups can be used to lookup about almost anything.  To lookup all the contacts who gave a certain number of gifts within a specific date range, you can use a custom lookups.

Here's a custom lookup that will return all contacts who have given 5 gifts or more since 1/1/2009.

In TntMPD, under the "Lookup" menu, click on "Custom".   Then copy/paste the following lookup:

SELECT Gift.ContactID
FROM Gift
WHERE (((Gift.[GiftDate])>=#1/1/2009#))
GROUP BY Gift.ContactID
HAVING COUNT(*) >= 5
ORDER BY COUNT(*) DESC

When you do this lookup, be sure to check the box "Custom Filter returns a list of Contact IDs".  If this box is not available, be sure you're running TntMPD 2.1 r10 or newer.

Click "OK", and the lookup will be sorted with the more frequent givers on top.

By way of another example, here's a custom lookup that returns all contacts who gave between 6 and 12 donations between 1/1/2009 and 12/31/2009:

SELECT Gift.ContactID
FROM Gift
WHERE ((Gift.GiftDate BETWEEN #1/1/2009# AND #12/31/2009#))
GROUP BY Gift.ContactID
HAVING COUNT(*) BETWEEN 6 AND 12
ORDER BY COUNT(*) DESC

Recent Comments

Leave the first comment for this page.
© 2024 TntWare, Inc. | Privacy | Terms of Use