Total Gifts >= 5000¶
This report can be added to Reports in the Main Menu and will look for donors whose total combined giving (if giving jointly) greater than or equal to $5,000. The report will display the total amount given year to date for the calendar year, along with the name and addresses of the primary donor. That means that for couples that give jointly the husband’s name will display.
This is protect by the user role Finance so no other user will see it. If you choose to Add to Menu, it will be added to Reports in the Main Menu. You can opt to Download to Excel if you want.
Copy the code below and paste it into a new SQL Script in your database.
The recommended name is
Obviously, you can change line 15 to whatever amount you prefer.
--Roles=Finance IF LEN(@p1) = 0 SET @p1 = CONVERT(VARCHAR, DATEPART(yyyy, GETDATE())) SELECT PeopleId, Amount, Name, PrimaryAddress, PrimaryAddress2, PrimaryCity, PrimaryState, PrimaryZip FROM dbo.People p JOIN ( SELECT CreditGiverId, SUM(Amount) Amount FROM Contributions2('1/1/' + @p1, '12/31/' + @p1, 0, 0, NULL, 0, NULL) GROUP BY CreditGiverId ) tt ON tt.CreditGiverId = p.PeopleId WHERE tt.Amount > 5000 ORDER by 'Amount'