In this scenario, there are two groups that the query needs to identify:
  1. Donors who gave to the fund/appeal/campaign in question
  2. Donors who have no gifts to the all other funds/appeals/campaigns except the one in group #1.
So the query/queries needs to ask for both groups at the same time to look for donors who gave to one fund/appeal/campaign (#1) and have no gifts to any other funds/appeals/campaigns. This can be done via one query using summary fields (Option 1) or using a two queries and Query Merge (Option 2).

NOTE: These examples use 'Fund' filters in the graphics. However, this can be replaced with Campaign or Appeal as needed.


Option 1 - One query with two summary fields:
 
  1. Create a Constituent query
  2. On the Criteria tab, select the following: 
    Summary Information > Summary for Gift > Total Number of Gifts greater than or equal to 1
       FILTERS:
            Gift Type one of [everything]
            AND Funds > Fund ID equals/one of [fund(s) that they should have given to]
      AND Summary Information > Summary for Gift > Total Number of Gifts equals 0
        FILTERS:
            Gift Type one of [everything]
            AND Funds > Fund ID one of [funds to consider except fund(s) listed above]
For example, here is how to find donors who gave to the CAMP fund but did not give to the JOHNSON fund:
sample query

Another example to find donors who gave only to the CAMP fund and nothing else, add all funds (or appeals or campaigns) to the summary field that equals 0.
sample query



Option 2 - Two queries and Query Merge:

Query A:
  1. Create a Constituent query
  2. On the Criteria tab, select the following: 
         Gifts > Campaign/Fund/Appeal ID equals/one of [the specific Campaign(s)/Fund(s)/Appeal(s)]
  3. Save and close the query
Query B:
  1. Create a Constituent query
  2. On the Criteria tab, select the following: 
         Gifts > Campaign/Fund/Appeal ID equals/one of [all other Campaign(s)/Fund(s)/Appeals you do not want]
  3. Save and close the query
Merge the queries with Query A as the Primary, Query B as the Secondary, and use SUB as the operator. This will create a final output query of the merge results.