Query
Query in the left navigation opens an editor for BNQL, the read-only query language over your collected events. Use it when you know exactly what you want and would rather write it than describe it, or to develop a query before pasting it into a dashboard widget.
The editor is available on plans that include API and query access, to team members of any role.
Running a query
Type a query into the editor and press Run, or use ⌘↵ on macOS and Ctrl+↵ elsewhere. The page opens with a starter query so you can see the shape of one immediately.

The time-range control in the header supplies the default window, so a query without explicit bounds reads the selected period. Bounds written into the query itself take precedence, which is what you want when a query is meant to answer for a fixed period regardless of what the picker says.
Results
Results appear underneath, with the first 500 lines shown as a preview and a note when there is more. The download button next to the time range saves the complete result set, named and typed according to the output format in your query: JSON, JSONL, CSV, TSV, Markdown, or the plain-text pretty format.
Query errors are reported in place, with the message from the engine, so a bad field name or a clause in the wrong order is quick to correct.
Writing BNQL
The full language is documented in the BNQL reference: clause order, the tables you can read (builds, commits, deployments, files, modules, orgs, projects, properties, pull requests, refs, tags, and tests), the fields on each, aggregates and percentiles, conditional aggregates, and the formatting functions.
A query always starts with SELECT and a table, and the clauses that follow keep a fixed order. This one asks which suites fail most often on the main branch:
SELECT
suite,
COUNT(*) AS runs,
COUNTIF(status='failed') AS failures
FROM tests
WHERE type='test-case' AND ref='main'
GROUP BY suite
ORDER BY failures DESC
LIMIT 10Two shortcuts are worth knowing. The AI Insights assistant writes and validates BNQL for you, and every reply ends with the query it used, which you can copy here as a starting point. The same language is also available outside the app through the Data API, so a query you develop here can be scripted, scheduled, or exported.