<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.tntware.com/tntconnect/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>How can I lookup all contacts who gave a certain number of gifts within a specific date range?</title><link>https://www.tntware.com/tntconnect/faqs/en/how-can-i-lookup-all-contacts-who-gave-a-certain-number-of-gifts-within-a-specific-date-range.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Debug Build: 40407.4157)</generator><item><title>How can I lookup all contacts who gave a certain number of gifts within a specific date range?</title><link>https://www.tntware.com/tntconnect/faqs/en/how-can-i-lookup-all-contacts-who-gave-a-certain-number-of-gifts-within-a-specific-date-range.aspx</link><pubDate>Wed, 02 Dec 2009 16:06:06 GMT</pubDate><guid isPermaLink="false">1fa7c37c-d68d-46f5-9639-4669b01a21c5:64</guid><dc:creator>Troy Wolbrink</dc:creator><comments>https://www.tntware.com/tntconnect/faqs/en/how-can-i-lookup-all-contacts-who-gave-a-certain-number-of-gifts-within-a-specific-date-range/comments.aspx</comments><description>Current revision posted to Frequently Asked Questions by Troy Wolbrink on 12/2/2009 4:06:06 PM&lt;br /&gt;
&lt;h2&gt;How can I lookup all contacts who gave a certain number of gifts within a specific date range?&lt;/h2&gt;
&lt;div style="font-size: 90%;"&gt;Filed under: Analysis, Lookups&lt;/div&gt;

&lt;p&gt;Custom lookups can be used to lookup about almost anything.&amp;nbsp; To lookup all the contacts who gave a certain number of gifts within a specific date range, you can use a custom &lt;span style="background: SpringGreen;"&gt;lookups&lt;/span&gt;&lt;span style="background: SpringGreen;"&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background: SpringGreen;"&gt;Here&lt;/span&gt;&lt;span style="background: SpringGreen;"&gt;&amp;#39;&lt;/span&gt;&lt;span style="background: SpringGreen;"&gt;s&lt;/span&gt;&amp;nbsp;&lt;span style="background: SpringGreen;"&gt;a&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;custom&lt;/span&gt; lookup &lt;span style="text-decoration: line-through; color: red;"&gt;like&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;this&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;(&lt;/span&gt;&lt;span style="text-decoration: line-through; color: red;"&gt;requires&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;TntMPD&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;2.1&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;r10&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;that&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;will&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;return&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;all&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;contacts&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;who&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;have&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;given&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;5&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;gifts&lt;/span&gt; or &lt;span style="text-decoration: line-through; color: red;"&gt;newer)&lt;/span&gt;&lt;span style="background: SpringGreen;"&gt;more&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;since&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;1/1/2009&lt;/span&gt;&lt;span style="background: SpringGreen;"&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background: SpringGreen;"&gt;In&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;TntMPD&lt;/span&gt;&lt;span style="background: SpringGreen;"&gt;,&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;under&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;the&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;&amp;quot;Lookup&amp;quot;&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;menu&lt;/span&gt;&lt;span style="background: SpringGreen;"&gt;,&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;click&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;on&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;&amp;quot;Custom&amp;quot;.&amp;nbsp;&amp;nbsp;&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;Then&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;copy/paste&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;the&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;following&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;lookup&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SELECT Gift.ContactID&lt;br /&gt;FROM Gift&lt;br /&gt;WHERE (((Gift.[GiftDate])&amp;gt;=#&lt;strong&gt;1/1/2009&lt;/strong&gt;#))&lt;br /&gt;GROUP BY Gift.ContactID&lt;br /&gt;HAVING COUNT(*) &amp;gt;= &lt;strong&gt;5&lt;/strong&gt;&lt;br /&gt;ORDER BY COUNT(*) DESC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration: line-through; color: red;"&gt;This&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;lookup&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;returns&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;all&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;the&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;contacts&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;who&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;gave&lt;/span&gt; &lt;strong&gt;&lt;span style="text-decoration: line-through; color: red;"&gt;5&lt;/span&gt;&lt;/strong&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;gifts&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;or&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;more&lt;/span&gt; &lt;span style="text-decoration: line-through; color: red;"&gt;since&lt;/span&gt; &lt;strong&gt;&lt;span style="text-decoration: line-through; color: red;"&gt;1/1/2009&lt;/span&gt;&lt;/strong&gt;&lt;span style="text-decoration: line-through; color: red;"&gt;.&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;When you do this lookup, be sure to check the box &amp;quot;&lt;strong&gt;Custom Filter returns a list of Contact IDs&lt;/strong&gt;&amp;quot;.&amp;nbsp; If this box is not available, be sure you&amp;#39;re running TntMPD 2.1 r10 or newer&lt;span style="background: SpringGreen;"&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background: SpringGreen;"&gt;Click&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;&amp;quot;OK&amp;quot;,&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;and&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;the&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;lookup&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;will&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;be&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;sorted&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;with&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;the&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;more&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;frequent&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;givers&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;on&lt;/span&gt; &lt;span style="background: SpringGreen;"&gt;top&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;By way of another example, here&amp;#39;s a&amp;nbsp;custom lookup&amp;nbsp;that returns all contacts who gave &lt;strong&gt;between 6 and 12&lt;/strong&gt; donations &lt;strong&gt;between 1/1/2009 and 12/31/2009&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SELECT Gift.ContactID&lt;br /&gt;FROM Gift&lt;br /&gt;WHERE ((Gift.GiftDate &lt;strong&gt;BETWEEN #1/1/2009# AND #12/31/2009#&lt;/strong&gt;))&lt;br /&gt;GROUP BY Gift.ContactID&lt;br /&gt;HAVING COUNT(*) &lt;strong&gt;BETWEEN 6 AND 12&lt;/strong&gt;&lt;br /&gt;ORDER BY COUNT(*) DESC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;</description></item><item><title>How can I lookup all contacts who gave a certain number of gifts within a specific date range?</title><link>https://www.tntware.com/tntconnect/faqs/en/how-can-i-lookup-all-contacts-who-gave-a-certain-number-of-gifts-within-a-specific-date-range/revision/1.aspx</link><pubDate>Wed, 02 Dec 2009 16:02:02 GMT</pubDate><guid isPermaLink="false">1fa7c37c-d68d-46f5-9639-4669b01a21c5:145</guid><dc:creator>Troy Wolbrink</dc:creator><comments>https://www.tntware.com/tntconnect/faqs/en/how-can-i-lookup-all-contacts-who-gave-a-certain-number-of-gifts-within-a-specific-date-range/comments.aspx</comments><description>Revision 1 posted to Frequently Asked Questions by Troy Wolbrink on 12/2/2009 4:02:02 PM&lt;br /&gt;
&lt;p&gt;Custom lookups can be used to lookup about almost anything.&amp;nbsp; To lookup all the contacts who gave a certain number of gifts within a specific date range, you can use a custom lookup like this (requires TntMPD 2.1 r10 or newer):&lt;/p&gt;
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SELECT Gift.ContactID&lt;br /&gt;FROM Gift&lt;br /&gt;WHERE (((Gift.[GiftDate])&amp;gt;=#&lt;strong&gt;1/1/2009&lt;/strong&gt;#))&lt;br /&gt;GROUP BY Gift.ContactID&lt;br /&gt;HAVING COUNT(*) &amp;gt;= &lt;strong&gt;5&lt;/strong&gt;&lt;br /&gt;ORDER BY COUNT(*) DESC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;This lookup returns all the contacts who gave &lt;strong&gt;5&lt;/strong&gt; gifts or more since &lt;strong&gt;1/1/2009&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When you do this lookup, be sure to check the box &amp;quot;&lt;strong&gt;Custom Filter returns a list of Contact IDs&lt;/strong&gt;&amp;quot;.&amp;nbsp; If this box is not available, be sure you&amp;#39;re running TntMPD 2.1 r10 or newer.&lt;/p&gt;
&lt;p&gt;By way of another example, here&amp;#39;s a&amp;nbsp;custom lookup&amp;nbsp;that returns all contacts who gave &lt;strong&gt;between 6 and 12&lt;/strong&gt; donations &lt;strong&gt;between 1/1/2009 and 12/31/2009&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SELECT Gift.ContactID&lt;br /&gt;FROM Gift&lt;br /&gt;WHERE ((Gift.GiftDate &lt;strong&gt;BETWEEN #1/1/2009# AND #12/31/2009#&lt;/strong&gt;))&lt;br /&gt;GROUP BY Gift.ContactID&lt;br /&gt;HAVING COUNT(*) &lt;strong&gt;BETWEEN 6 AND 12&lt;/strong&gt;&lt;br /&gt;ORDER BY COUNT(*) DESC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;</description></item></channel></rss>