In Explore, data is calculated in queries. This article introduces you to queries, including what they are, how they’re structured, and how you interact with them in Explore. It also gives you some resources where you can find more detailed information about working with queries.
This article contains the following topics:
What are queries?
Queries are questions you ask about the information stored in your Zendesk account. For example, you could ask, "What percentage of this month's tickets have a priority of urgent?" Or, "Which agents have solved the most tickets this month?"
You create queries in the query builder. To learn more about navigating the query builder, see Getting started with the Explore interface.
Queries are stored in the queries library. You can open the queries library anytime by clicking the () icon on the left sidebar.
How queries interact with datasets
Before you create a query, you need to define the data source that contains the business information you want to report on. In Explore, these data sources are referred to as datasets. These datasets connect you to information about other Zendesk products, like Support.
Whenever you create a query, you’ll be prompted to choose the dataset you want. Typically, you’ll use the out-of-the-box datasets for the product you want to query. More advanced users might create new datasets for testing and customization purposes.For more information on datasets, see Understanding Explore datasets.
How queries are structured
A typical query contains the following pieces:
Metrics: Quantifiable data that represents the things you want to measure. A query must always contain at least one metric. Examples: Number of tickets, number of updates, number of comments, and more
Attributes: Qualitative data that “slices” your metric into groups defined by the values of the attribute. Examples: Dates, user groups, tags, and more
For example, the attribute Assignee name lists your different Zendesk Support assignee names as the values. If your query includes the Tickets metric and the Assignee name attribute, Explore displays the number of tickets for each assignee.
In the Query builder, metrics are added in the Metrics panel. Attributes can be added to the Columns, Rows, Explosions, and Filters panels.For more information on adding metrics and attributes, see Adding metrics and attributes to queries.
Prebuilt Explore queries
Explore provides some out-of-the-box queries that help you start reporting on your Zendesk product data faster. When you first open Explore, you’ll find the following types of prebuilt queries in the default datasets.
Sample queries showcase the data available in the default datasets and act as the foundation for your first custom queries. You can edit these queries to suit your needs or clone them.You can identify these queries by the [sample] label in their titles.