When you create a new ad-hoc query, after you select a source view, the New Ad-hoc Query screen appears open to the Select filter and output fields tab.
Under Browse for fields in, you can view the types of fields that are available for the query source view you selected. You can expand a node to drill-down to a specific group of fields.
Tip: To quickly search for a field, enter the field name in Find field and press ENTER on your keyboard. The program displays applicable fields in the middle pane. Use the arrows on your keyboard to browse through the list. If you select a group and click Search up, the search applies only to fields in the selected node.
The middle pane lists the Fields and System fields for the selected group.
Under Include records where, select the criteria fields and select operators to determine which records to include in the query.
For example, to create an individual query to find the names of everyone with a home telephone number, you can use the criteria field and operator of Phone Type “equals” Home to group all records with a value in this field. For information about the available combining operators, refer to Query Criteria Operators. For information about how to compare values of output fields, refer to Compare Output Field Values.
To specify output fields for the query, select them in the middle pane and drag them into Result fields to display. You must specify at least one output field. Selected fields correspond to the information you want to view in the query results and they appear as column headings in the query output.
Note: Depending on the source view of the query, some fields may automatically appear under Result fields to display. You can remove these default fields from the output as necessary.
To view a calculation of the field results instead of the actual contents of the field, select an output field and click Summarize. For example, if you select a date field as an output and assign a minimum date, all records included in the query must satisfy the minimum date requirement.
The calculation options available depend on the field you select. For information, refer to Summarize Query Output.
Note: If you create a selection from the query, it cannot contain summary output fields unless it also contains the system record ID of the query view. The system record ID is the unique identifier for a record in the program. For example, for a constituent query, the system record ID field is the Constituent record field. You must include it because summary fields can cause the output to not contain unique values, such as when you select the average revenue for each constituent. For information about how to save queries as selections, refer to Create Selections from Queries.
To edit the label of an output field for the header row of an export, select the field name, click Change column header, and enter the name to appear in the export header.
To specify a sort order for the query results or filter on aggregate values, select the Set sort and group options tab. For information about the items on this tab, refer to Set the sort and group options.
Otherwise, select the Set save options tab and specify the properties of the query. For information about the items on the Set save options tab, refer to Set query properties.