Skip to main content

Introduction

Describes how to write queries which report on people data.

You will need the Reporting permission to use the Query Builder. What your queries return still depends on your campus access and the read permissions for what you query.

The Query Builder is the main tool for ad-hoc reporting on people data. It has a variety of additional uses, such as:

  • Mail merge

  • Generating address labels

  • Mass change for people records

  • Printing giving statements based on query results

  • Printable built-in reports

  • Mapping addresses on a map

  • Creating charts and graphs of your data

You can open the Query Builder by clicking Reporting > Query Builder in the left-hand navigation menu. It defaults to People but can also be used to query group and contribution data.

The Query Builder with the Filters, Query, Columns and Results sections.

The Query Builder is organized into four main sections: Filters, Query, Columns, and Results.

On the Designer tab, a switch above the builder lets you choose between the Query Editor and the AI Assistant. The Query Editor is the classic builder described in this collection, where you set the filters and columns yourself. The AI Assistant lets you describe the report you need in plain language and builds it for you. It is available on the Core Plus plan to users with the Read AI Assistant or Write AI Assistant permission. What is the AI Assistant in the Query Builder? explains more.


Two things to know before you start

Queries read one organization's giving at a time

If your account has two or more organizations that each keep their own giving, a query reads one organization's giving at a time.

  • Contributions queries - choose the organization in the Organization field at the top of Display.

  • People queries with a giving column or filter - you're asked for the organization the first time the query runs, and the field shows after that.

The organization is saved with the query. If a query that reads giving has no organization chosen, links to it and schedules for it are refused, and lists that use it as an audience read every organization.

Your access always applies

Your campus access and your campus selector are applied outside your filters, so an "or" in your query can never bring back a record you aren't allowed to see. Two people running the same saved query can get different results. How do I view the results of the query? explains why.


The Organization filter and column

The Organization filter and column appear only when your account has two or more organizations. On Contributions queries they also appear while an archived organization still owns giving. The filter accepts only is in list and is not in list.


Who can see a saved query

  • You always see the queries you own.

  • Other people see a saved query if it is set to Anyone Can Edit or Anyone Can View, or shared with them by name, and its campuses or organizations overlap their campus limit.

  • Your campus selector is not part of who can see a query, but the Queries list does apply it, even to your own queries. If a saved query seems to be missing, widen your campus selector.

How do I save, edit or delete queries? covers saving and sharing.


Helpful Tips

  • There are multiple ways to write the same query (one that returns the same results). If you have difficulty coming up with the query you are looking for, try looking at it a different way.

  • AND operators have higher precedence than OR operators. Think of OR as splitting your query into pieces at that point. Any one piece being true will return that person profile.

Other Helpful Articles

Did this answer your question?