For example: if you used criteria to find all subscriber records in the past 5 years, you would get 1, 2 ,3 4 or 5 records - depending on how many years the person has been a subscriber. Since we know each subscription package has a year associated with it, if you make a having criteria that is having a unique count of subscription year >= 4, you would find people who were 4 or 5 year subscribers.
To create the query, you need two things:
The Mail List Criteria window opens.
The Mail List dialog opens.
The Parameters window opens.
The Edit Report Parameters window opens.
Note the criteria for selection on the left side of the window gives yous different options to choose from.
You are returned to the Parameters window and your criteria selection appears in the search.
You are returned to the Mail List window.
The normal criteria is optional. If you don't specify anything, you will retrieve all donations. Some things you might want to include in criteria are one or more of:
In short, you can limit the donations selected to ANY criteria you could enter (or select all donations)
The HAVING clause re-examines the set of data is found using the normal criteria. It then imposes a further restriction on the aggregate set of data. Examples could be:
The query is based on ticket data for a patron and you can add other criteria such as:
The example below shows the user of Ticket Quantity from the ticket data per performance in the having clause to obtain people who bought more than 20 tickets (in all time). The first line of criteria was added to make sure that they were Paid tickets and not comps.