Note: This information is intended only for users who are
comfortable working with SQL (Structured Query Language). Other users should use the
Explore report builder UI to filter reports instead.
For advanced reporting users, Explore offers a SQL-based way to filter reports without using the typical Metrics, Columns, Rows, and Filters panels of the report builder.
Specifically, the SQL options panel gives you fine-grained control over the ORDER BY and LIMIT clauses of the generated SQL query.
To use SQL to filter a report
- In Explore, create a new report or open an existing one.
- In the Result manipulation () menu, select SQL options.
- Construct the SQL query using the following fields as needed:
- ‘Order by’ clause: Specify how results should be sorted.
- ‘Limit’ clause: Specify how many results to return.
- (Optional) In the Replace NULL by field, select NULL to replace blanks in your report with the word “NULL” to improve readability.
- Click Apply. Your report results appear in the report builder.
Note: During account assumption only, the SQL options menu includes
additional information about the SQL query that helps Zendesk Customer Support
troubleshoot issues.