Buildnote Query Language (BNQL)
Buildnote Query Language (BNQL) is a SQL-like query language for querying your data via the Data API.
SELECT
SELECT field1, field2 [AS alias]
FROM <table>
[WHERE condition [AND|OR condition ...]]
[SINCE 'yyyy-MM-dd HH:mm:ss[.SSS]']
[UNTIL 'yyyy-MM-dd HH:mm:ss[.SSS]']
[GROUP BY field1, field2, ...]
[ORDER BY field [ASC|DESC] [, ...]]
[LIMIT n]
[FORMAT format]Specify fields to return. Use * to select all fields.
Supported aggregate functions:
| Function | Description |
|---|---|
AVG(field) | Average of all values |
COUNT() | Count of all values |
DISTINCT(field) | Select distinct values |
DISTINCT_COUNT(field) | Count of distinct values |
MAX(field) | Maximum value |
MIN(field) | Minimum value |
P001(field) | 0.1th percentile |
P01(field) | 1st percentile |
P05(field) | 5th percentile |
P10(field) | 10th percentile |
P20(field) | 20th percentile |
P25(field) | 25th percentile (Q1) |
P50(field) | 50th percentile (median) |
P75(field) | 75th percentile (Q3) |
P80(field) | 80th percentile |
P90(field) | 90th percentile |
P95(field) | 95th percentile |
P99(field) | 99th percentile |
P999(field) | 99.9th percentile |
SUM(field) | Sum of all values |
Conditional aggregate functions apply aggregation only to rows matching an inline condition. The condition uses the same syntax as WHERE. Scalar functions are allowed in both argument slots.
| Function | Description |
|---|---|
AVGIF(field, condition) | Average of values where condition is true |
COUNTIF(condition) | Count of rows where condition is true |
MAXIF(field, condition) | Maximum value where condition is true |
MINIF(field, condition) | Minimum value where condition is true |
SUMIF(field, condition) | Sum of values where condition is true |
SELECT SUMIF(duration, status = 'successful') AS total_successful FROM tests
SELECT SUMIF(toNumber(value), toNumber(value) > 0) AS positive_sum FROM propertiesSupported scalar functions:
| Function | Description |
|---|---|
formatDateTime(time, format) | Format a datetime value using a format string |
formatDuration(ms) | Format millisecond duration as a human-readable string |
formatPercentage(ratio) | Format ratio (0.0–1.0) as percentage string |
toNumber(value) | Convert string to number (Float64) value |
toString(value) | Convert value to string |
Scalar functions may be nested and combined with aggregate functions:
SELECT toNumber(value) AS num FROM properties
SELECT toString(duration) AS dur_str FROM tests
SELECT AVG(toNumber(value)) AS avg_num FROM properties
SELECT toString(SUM(duration)) AS total_str FROM tests
SELECT toString(toNumber(toString(duration))) AS converted FROM testsArithmetic expressions
Arithmetic expressions are written in parentheses and support +, -, *, / with standard precedence. Expression parts may be number literals, field references, or any function call (including aggregates).
SELECT (duration / 1000) AS secs FROM tests
SELECT (AVG(duration) / 1000) AS avg_secs FROM tests
SELECT ((MAX(duration) - MIN(duration)) / 1000) AS range_secs FROM tests
SELECT (1 + toNumber('12')) AS x FROM testsPrecedence follows standard arithmetic rules — * and / bind tighter than + and -. Use inner parentheses to override: ((a + b) * c).
AS
Fields and aggregate expressions may be aliased with AS. Aliases may be used in ORDER BY and GROUP BY.
SELECT field AS alias
SELECT aggregateFn(field) AS aliasFROM
Available tables:
| Table | Description |
|---|---|
builds | Events related to builds |
commits | Commits pushed to tracked branches |
deployments | Deployments to tracked environments |
files | Files collected during build runs |
modules | Build modules tracked across your projects |
orgs | Organizations in your account |
projects | Projects within your organizations |
properties | Custom properties submitted to builds |
pull_requests | Pull requests |
refs | Build refs tracked across your modules |
tags | Tags tracked across your builds |
tests | Individual test results from build runs |
WHERE
Filter rows. Combine conditions with AND and OR.
| Operator | Description |
|---|---|
= | Equal |
!= | Not equal |
<> | Not equal (alternative syntax) |
< | Less than |
> | Greater than |
<= | Less than or equal |
>= | Greater than or equal |
IN | Match against a list of values |
CONTAINS(field, value) | True if field contains the substring |
NOT(condition) | Negates a condition |
SELECT * FROM tests WHERE status IN ('running', 'successful', 'failed', 'skipped', 'cancelled', 'unknown')
SELECT * FROM tests WHERE duration IN (1, 2, 3)
SELECT * FROM tests WHERE CONTAINS(name, 'login')
SELECT * FROM tests WHERE CONTAINS(name, 'login') AND status = 'failed'
SELECT COUNTIF(CONTAINS(name, 'login')) AS cnt FROM tests
SELECT * FROM tests WHERE NOT(status = 'failed')
SELECT * FROM tests WHERE NOT(CONTAINS(name, 'flaky')) AND ref = 'main'SINCE / UNTIL
Filter rows by event timestamp. Both bounds are inclusive.
| Clause | Description |
|---|---|
SINCE 'datetime' | Include only events at or after this timestamp |
UNTIL 'datetime' | Include only events at or before this timestamp |
Accepted formats:
| Format | Example |
|---|---|
yyyy-MM-dd HH:mm:ss | '2024-01-15 09:00:00' |
yyyy-MM-dd HH:mm:ss.SSS | '2024-01-15 09:00:00.000' |
yyyy-MM-dd | '2024-01-15' (treated as 00:00:00 UTC) |
GROUP BY
Groups rows for aggregate computation. Required when SELECT contains both aggregate and non-aggregate fields.
GROUP BY field1
GROUP BY field1, field2ORDER BY
Sort results by one or more fields. Direction defaults to ASC.
| Direction | Description |
|---|---|
ASC | Ascending order (smallest to largest) |
DESC | Descending order (largest to smallest) |
FORMAT
Controls output format. Defaults to JSONL.
| Format | Description |
|---|---|
CSV | Comma-separated values |
JSON | JSON object with results array |
JSONL | Newline-delimited JSON |
MARKDOWN | Markdown table |
PRETTY | Human-readable table |
TSV | Tab-separated values |
Examples
List modules sorted alphabetically:
SELECT org, project, module FROM modules ORDER BY module ASC LIMIT 100Average duration of failed tests per project, sorted slowest first:
SELECT org, project, AVG(duration) AS avg_dur FROM tests
WHERE status = 'failed'
GROUP BY org, project
ORDER BY avg_dur DESC
LIMIT 50
FORMAT CSVAverage numeric property value per build:
SELECT build, AVG(toNumber(value)) AS avg_value FROM properties
WHERE name = 'coverage'
GROUP BY build
ORDER BY avg_value DESCFailed tests in a date range:
SELECT org, project, name, duration FROM tests
WHERE status = 'failed'
SINCE '2024-01-01'
UNTIL '2024-01-31'
ORDER BY duration DESC
LIMIT 100P95 test duration per project since a specific datetime:
SELECT project, P95(duration) AS p95_dur FROM tests
SINCE '2024-06-01 00:00:00'
GROUP BY project
ORDER BY p95_dur DESCSuccessful vs failed duration totals in a single query:
SELECT
SUMIF(duration, status = 'successful') AS total_successful_ms,
SUMIF(duration, status = 'failed') AS total_failed_ms
FROM tests
WHERE ref = 'main'P95 duration in seconds and range (max − min) per project:
SELECT
project,
(P95(duration) / 1000) AS p95_secs,
((MAX(duration) - MIN(duration)) / 1000) AS range_secs
FROM tests
GROUP BY project
ORDER BY p95_secs DESCFunctions
Aggregate functions
AVG(field)
Average of all values
| Parameter | Description |
|---|---|
field | Numeric field or expression to average |
Returns the arithmetic mean of all non-null values.
SELECT AVG(duration) FROM tests
SELECT AVG(duration) AS avg_dur FROM tests GROUP BY projectCOUNT()
Count of all values
Returns the number of rows. Accepts a field name or *.
SELECT COUNT() FROM testsDISTINCT(field)
Select distinct values
| Parameter | Description |
|---|---|
field | Field to return unique values of |
Returns only unique values of the field.
SELECT DISTINCT(status) FROM testsDISTINCT_COUNT(field)
Count of distinct values
| Parameter | Description |
|---|---|
field | Field to count unique values of |
Returns the count of unique values.
SELECT DISTINCT_COUNT(status) FROM testsMAX(field)
Maximum value
| Parameter | Description |
|---|---|
field | Field or expression to find the maximum of |
Returns the largest value.
SELECT MAX(duration) FROM testsMIN(field)
Minimum value
| Parameter | Description |
|---|---|
field | Field or expression to find the minimum of |
Returns the smallest value.
SELECT MIN(duration) FROM testsP001(field)
0.1th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 0.1th percentile value. Useful for identifying the extreme low end of a distribution.
SELECT P001(duration) FROM tests GROUP BY projectP01(field)
1st percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 1st percentile value.
SELECT P01(duration) FROM tests GROUP BY projectP05(field)
5th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 5th percentile value.
SELECT P05(duration) FROM tests GROUP BY projectP10(field)
10th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 10th percentile value.
SELECT P10(duration) FROM tests GROUP BY projectP20(field)
20th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 20th percentile value.
SELECT P20(duration) FROM tests GROUP BY projectP25(field)
25th percentile (Q1)
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 25th percentile (first quartile). Half the values below the median fall below this point.
SELECT P25(duration) FROM tests GROUP BY projectP50(field)
50th percentile (median)
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the median value. Half of all values fall below this point.
SELECT P50(duration) FROM tests GROUP BY projectP75(field)
75th percentile (Q3)
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 75th percentile (third quartile). Half the values above the median fall below this point.
SELECT P75(duration) FROM tests GROUP BY projectP80(field)
80th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 80th percentile value.
SELECT P80(duration) FROM tests GROUP BY projectP90(field)
90th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 90th percentile value. A common threshold for identifying slow outliers.
SELECT P90(duration) FROM tests GROUP BY projectP95(field)
95th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 95th percentile value. Use to measure tail latency in performance-sensitive workloads.
SELECT P95(duration) AS p95_dur FROM tests GROUP BY projectP99(field)
99th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 99th percentile value. Captures near-worst-case performance.
SELECT P99(duration) AS p99_dur FROM tests GROUP BY projectP999(field)
99.9th percentile
| Parameter | Description |
|---|---|
field | Numeric field or expression |
Returns the 99.9th percentile value. Identifies extreme outliers in large datasets.
SELECT P999(duration) AS p999_dur FROM tests GROUP BY projectSUM(field)
Sum of all values
| Parameter | Description |
|---|---|
field | Numeric field or expression to sum |
Returns the sum of all non-null values.
SELECT SUM(duration) FROM testsConditional aggregate functions
AVGIF(field, condition)
Average of values where condition is true
| Parameter | Description |
|---|---|
field | Numeric field or expression to average |
condition | Filter condition — only matching rows are included |
Returns the average of field values for rows where the condition is true.
SELECT AVGIF(duration, status = 'failed') AS avg_failed_ms FROM testsCOUNTIF(condition)
Count of rows where condition is true
| Parameter | Description |
|---|---|
condition | Filter condition — rows where this is true are counted |
Returns the count of rows where the condition is true.
SELECT COUNTIF(duration, status = 'failed') AS failed_count FROM testsMAXIF(field, condition)
Maximum value where condition is true
| Parameter | Description |
|---|---|
field | Field or expression to find the maximum of |
condition | Filter condition — only matching rows are included |
Returns the maximum field value among rows where the condition is true.
SELECT MAXIF(duration, status = 'failed') AS max_failed_ms FROM testsMINIF(field, condition)
Minimum value where condition is true
| Parameter | Description |
|---|---|
field | Field or expression to find the minimum of |
condition | Filter condition — only matching rows are included |
Returns the minimum field value among rows where the condition is true.
SELECT MINIF(duration, status = 'passed') AS min_passed_ms FROM testsSUMIF(field, condition)
Sum of values where condition is true
| Parameter | Description |
|---|---|
field | Numeric field or expression to sum |
condition | Filter condition — only matching rows are included |
Returns the sum of field values for rows where the condition is true. The condition uses the same syntax as WHERE.
SELECT SUMIF(duration, status = 'failed') AS failed_ms FROM testsScalar functions
formatDateTime(time, format)
Format a datetime value using a format string
| Parameter | Description |
|---|---|
time | Datetime field or expression to format |
format | Format string with %-placeholders, e.g. '%Y-%m-%d %H:%i:%S' |
Formats a datetime value into a string using a format string. format must be a string literal.
Supported format placeholders:
| Placeholder | Description | Example |
|---|---|---|
%a | abbreviated weekday name (Mon-Sun) | Mon |
%b | abbreviated month name (Jan-Dec) | Jan |
%c | month as an integer number (01-12) | 01 |
%C | year divided by 100 and truncated to integer (00-99) | 20 |
%d | day of the month, zero-padded (01-31) | 02 |
%D | short MM/DD/YY date, equivalent to %m/%d/%y | 01/02/18 |
%e | day of the month, space-padded (1-31) | 2 |
%f | fractional second | 123456 |
%F | short YYYY-MM-DD date, equivalent to %Y-%m-%d | 2018-01-02 |
%g | two-digit year format, aligned to ISO 8601 | 18 |
%G | four-digit year format for ISO week number | 2018 |
%h | hour in 12h format (01-12) | 09 |
%H | hour in 24h format (00-23) | 22 |
%i | minute (00-59) | 33 |
%I | hour in 12h format (01-12) | 10 |
%j | day of the year (001-366) | 002 |
%k | hour in 24h format (00-23) | 14 |
%l | hour in 12h format (01-12) | 09 |
%m | month as an integer number (01-12) | 01 |
%M | full month name (January-December) | January |
%n | new-line character | |
%p | AM or PM designation | PM |
%Q | quarter (1-4) | 1 |
%r | 12-hour HH:MM AM/PM time, equivalent to %h:%i %p | 10:30 PM |
%R | 24-hour HH:MM time, equivalent to %H:%i | 22:33 |
%s | second (00-59) | 44 |
%S | second (00-59) | 44 |
%t | horizontal-tab character | |
%T | ISO 8601 time format (HH:MM:SS), equivalent to %H:%i:%S | 22:33:44 |
%u | ISO 8601 weekday as number with Monday as 1 (1-7) | 2 |
%V | ISO 8601 week number (01-53) | 01 |
%w | weekday as an integer number with Sunday as 0 (0-6) | 2 |
%W | full weekday name (Monday-Sunday) | Monday |
%y | year, last two digits (00-99) | 18 |
%Y | year | 2018 |
%z | time offset from UTC as +HHMM or -HHMM | -0500 |
%% | a % sign | % |
SELECT formatDateTime(timestamp, '%Y-%m-%d') AS day FROM tests
SELECT formatDateTime(timestamp, '%Y-%m-%d %H:%i:%S') AS moment FROM testsformatDuration(ms)
Format millisecond duration as a human-readable string
| Parameter | Description |
|---|---|
ms | Duration in milliseconds |
Formats a millisecond integer as a compact human-readable string. Only the most significant parts are shown: hours+minutes, minutes+seconds, or seconds+milliseconds. Negative values are prefixed with -. Zero returns '0ms'.
Examples: '2h 5m', '3m 45s', '12s 500ms'.
SELECT formatDuration(duration) AS dur FROM testsformatPercentage(ratio)
Format ratio (0.0–1.0) as percentage string
| Parameter | Description |
|---|---|
ratio | Ratio value between 0.0 and 1.0 |
Formats a ratio (0.0–1.0) as a human-readable percentage string. For example, 0.234 becomes '23.4%'.
SELECT formatPercentage(pass_rate) AS pct FROM teststoNumber(value)
Convert string to number (Float64) value
| Parameter | Description |
|---|---|
value | String field or expression to convert to Float64 |
Converts a string field to a Float64 number. Returns nan for non-numeric input. Required before applying numeric aggregate functions to string-typed fields.
SELECT AVG(toNumber(value)) FROM properties WHERE name = 'coverage'toString(value)
Convert value to string
| Parameter | Description |
|---|---|
value | Field or expression to convert to string |
Converts any value to its string representation. Useful for output formatting or wrapping numeric fields before string operations.
SELECT toString(duration) AS dur_str FROM testsTables
builds
Events related to builds
| Field | Type | Description |
|---|---|---|
timestamp | String | Event timestamp (yyyy-MM-dd HH:mm:ss.SSS) |
event_id | String | Event ID |
entity_id | String | Entity identifier (identifies same entities across builds) |
org | String | Organization identifier |
project | String | Project identifier |
module | String | Module identifier |
build | String | Build identifier |
sha | String | Git commit SHA |
ref | String | Git ref (branch or tag) |
submitter | String | Submitter identifier |
status | String | Event status |
tags | String | Comma-separated list of tags |
duration | Number | Test duration in milliseconds |
source_type | String | Source tool type (e.g. junit, gradle) |
source_url | String | Source URL |
collector_id | String | Collector identifier |
collector_source | String | Collector source name |
name | String | Build stage name |
url | String | Build stage url |
type | String | Build event type |
started_at | String | Build event start time |
completed_at | String | Build event completion time |
runner_labels | String | Comma-separated list of runner labels |
timestamp
Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)
Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.
SELECT timestamp FROM tests ORDER BY timestamp DESCevent_id
Event ID
Unique identifier for the event. Useful for deduplication or referencing a specific event.
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'entity_id
Entity identifier (identifies same entities across builds)
Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCmodule
Module identifier
Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESCbuild
Build identifier
Identifier of the CI/CD build run that produced this event.
SELECT build, COUNT(*) AS total, COUNTIF(duration, status = 'failed') AS failed FROM tests GROUP BY buildsha
Git commit SHA
Full or abbreviated Git commit SHA associated with the build.
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sharef
Git ref (branch or tag)
Git ref (branch name or tag) associated with the build.
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESCsubmitter
Submitter identifier
Identifier of the actor that submitted the event, typically a CI runner or user.
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitterstatus
Event status
Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown.
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESCtags
Comma-separated list of tags
All tags associated with the event, returned as a comma-separated string. Use tag instead to filter or group by individual tag values.
SELECT name, tags FROM tests WHERE status = 'failed'duration
Test duration in milliseconds
Execution duration of the test in milliseconds.
SELECT name, duration FROM tests WHERE status = 'passed' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY projectsource_type
Source tool type (e.g. junit, gradle)
The type of tool that produced the event (e.g. junit, gradle, pytest).
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_typesource_url
Source URL
URL pointing to the source of the event, such as a CI job or report artifact.
SELECT name, source_url FROM tests WHERE status = 'failed'collector_id
Collector identifier
Identifier of the Buildnote collector that ingested this event.
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_idcollector_source
Collector source name
Name of the source integration or pipeline step that triggered the collector.
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_sourcename
Build stage name
Name of the build stage or job.
SELECT name, duration FROM builds ORDER BY duration DESC LIMIT 20url
Build stage url
URL of the build stage, typically a link to the CI job run.
SELECT name, url FROM builds WHERE status = 'failed'type
Build event type
Category of the build event (e.g. pipeline, stage, job).
SELECT type, COUNT(*) AS total FROM builds GROUP BY typestarted_at
Build event start time
Timestamp when the build stage started, formatted as a string.
SELECT name, started_at, completed_at FROM builds ORDER BY started_at DESC LIMIT 20completed_at
Build event completion time
Timestamp when the build stage completed, formatted as a string.
SELECT name, started_at, completed_at FROM builds ORDER BY completed_at DESC LIMIT 20runner_labels
Comma-separated list of runner labels
Labels assigned to the CI runner that executed this build stage, returned as a comma-separated string.
SELECT runner_labels, AVG(duration) AS avg_dur FROM builds GROUP BY runner_labelscommits
Commits pushed to tracked branches
| Field | Type | Description |
|---|---|---|
timestamp | String | Event timestamp (yyyy-MM-dd HH:mm:ss.SSS) |
event_id | String | Event ID |
entity_id | String | Entity identifier (identifies same entities across builds) |
org | String | Organization identifier |
project | String | Project identifier |
sha | String | Git commit SHA |
ref | String | Git ref (branch or tag) |
submitter | String | Submitter identifier |
status | String | Event status |
tags | String | Comma-separated list of tags |
duration | Number | Test duration in milliseconds |
source_type | String | Source tool type (e.g. junit, gradle) |
source_url | String | Source URL |
collector_id | String | Collector identifier |
collector_source | String | Collector source name |
message | String | Commit message |
url | String | Commit URL |
ref_url | String | Ref URL |
author_name | String | Author display name |
author_username | String | Author username |
author_email | String | Author email address |
committer_name | String | Committer display name |
committer_username | String | Committer username |
committer_email | String | Committer email address |
pusher_name | String | Pusher display name |
pusher_username | String | Pusher username |
pusher_email | String | Pusher email address |
pusher_avatar_url | String | Pusher avatar URL |
pusher_url | String | Pusher profile URL |
added_files | String | Comma-separated list of added files |
removed_files | String | Comma-separated list of removed files |
modified_files | String | Comma-separated list of modified files |
timestamp
Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)
Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.
SELECT timestamp FROM tests ORDER BY timestamp DESCevent_id
Event ID
Unique identifier for the event. Useful for deduplication or referencing a specific event.
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'entity_id
Entity identifier (identifies same entities across builds)
Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCsha
Git commit SHA
Full or abbreviated Git commit SHA associated with the build.
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sharef
Git ref (branch or tag)
Git ref (branch name or tag) associated with the build.
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESCsubmitter
Submitter identifier
Identifier of the actor that submitted the event, typically a CI runner or user.
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitterstatus
Event status
Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown.
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESCtags
Comma-separated list of tags
All tags associated with the event, returned as a comma-separated string. Use tag instead to filter or group by individual tag values.
SELECT name, tags FROM tests WHERE status = 'failed'duration
Test duration in milliseconds
Execution duration of the test in milliseconds.
SELECT name, duration FROM tests WHERE status = 'passed' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY projectsource_type
Source tool type (e.g. junit, gradle)
The type of tool that produced the event (e.g. junit, gradle, pytest).
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_typesource_url
Source URL
URL pointing to the source of the event, such as a CI job or report artifact.
SELECT name, source_url FROM tests WHERE status = 'failed'collector_id
Collector identifier
Identifier of the Buildnote collector that ingested this event.
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_idcollector_source
Collector source name
Name of the source integration or pipeline step that triggered the collector.
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_sourcemessage
Commit message
The commit message.
SELECT sha, message FROM commits ORDER BY timestamp DESC LIMIT 20url
Commit URL
URL of the commit in the source control system.
SELECT sha, url FROM commits WHERE ref = 'main'ref_url
Ref URL
URL of the branch or tag in the source control system.
SELECT ref, ref_url FROM commits GROUP BY ref, ref_urlauthor_name
Author display name
Display name of the commit author.
SELECT author_name, COUNT(*) AS total FROM commits GROUP BY author_name ORDER BY total DESCauthor_username
Author username
Username of the commit author.
SELECT author_username, COUNT(*) AS total FROM commits GROUP BY author_username ORDER BY total DESCauthor_email
Author email address
Email address of the commit author.
SELECT author_email, COUNT(*) AS total FROM commits GROUP BY author_email ORDER BY total DESCcommitter_name
Committer display name
Display name of the committer (the person who applied the commit).
SELECT committer_name, COUNT(*) AS total FROM commits GROUP BY committer_name ORDER BY total DESCcommitter_username
Committer username
Username of the committer.
SELECT committer_username, COUNT(*) AS total FROM commits GROUP BY committer_username ORDER BY total DESCcommitter_email
Committer email address
Email address of the committer.
SELECT committer_email, COUNT(*) AS total FROM commits GROUP BY committer_email ORDER BY total DESCpusher_name
Pusher display name
Display name of the person who pushed the commit.
SELECT pusher_name, COUNT(*) AS total FROM commits GROUP BY pusher_name ORDER BY total DESCpusher_username
Pusher username
Username of the pusher.
SELECT pusher_username, COUNT(*) AS total FROM commits GROUP BY pusher_username ORDER BY total DESCpusher_email
Pusher email address
Email address of the pusher.
SELECT pusher_email, COUNT(*) AS total FROM commits GROUP BY pusher_email ORDER BY total DESCpusher_avatar_url
Pusher avatar URL
Avatar URL of the pusher.
SELECT pusher_username, pusher_avatar_url FROM commits GROUP BY pusher_username, pusher_avatar_urlpusher_url
Pusher profile URL
Profile URL of the pusher in the source control system.
SELECT pusher_username, pusher_url FROM commits GROUP BY pusher_username, pusher_urladded_files
Comma-separated list of added files
Files added in this commit, as a comma-separated string.
SELECT sha, added_files FROM commits WHERE ref = 'main' LIMIT 20removed_files
Comma-separated list of removed files
Files removed in this commit, as a comma-separated string.
SELECT sha, removed_files FROM commits WHERE ref = 'main' LIMIT 20modified_files
Comma-separated list of modified files
Files modified in this commit, as a comma-separated string.
SELECT sha, modified_files FROM commits WHERE ref = 'main' LIMIT 20deployments
Deployments to tracked environments
| Field | Type | Description |
|---|---|---|
timestamp | String | Event timestamp (yyyy-MM-dd HH:mm:ss.SSS) |
event_id | String | Event ID |
entity_id | String | Entity identifier (identifies same entities across builds) |
org | String | Organization identifier |
project | String | Project identifier |
module | String | Module identifier |
build | String | Build identifier |
sha | String | Git commit SHA |
ref | String | Git ref (branch or tag) |
submitter | String | Submitter identifier |
status | String | Event status |
tags | String | Comma-separated list of tags |
duration | Number | Test duration in milliseconds |
source_type | String | Source tool type (e.g. junit, gradle) |
source_url | String | Source URL |
collector_id | String | Collector identifier |
collector_source | String | Collector source name |
environment | String | Deployment target environment |
production | String | Whether the deployment targeted production (true/false) |
category | String | Deployment category (release, rollback, hotfix) |
started_at | String | Deployment start time |
completed_at | String | Deployment completion time |
version | String | Deployed version or tag |
name | String | Deployment name or description |
url | String | Deployment URL |
timestamp
Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)
Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.
SELECT timestamp FROM tests ORDER BY timestamp DESCevent_id
Event ID
Unique identifier for the event. Useful for deduplication or referencing a specific event.
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'entity_id
Entity identifier (identifies same entities across builds)
Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCmodule
Module identifier
Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESCbuild
Build identifier
Identifier of the CI/CD build run that produced this event.
SELECT build, COUNT(*) AS total, COUNTIF(duration, status = 'failed') AS failed FROM tests GROUP BY buildsha
Git commit SHA
Full or abbreviated Git commit SHA associated with the build.
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sharef
Git ref (branch or tag)
Git ref (branch name or tag) associated with the build.
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESCsubmitter
Submitter identifier
Identifier of the actor that submitted the event, typically a CI runner or user.
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitterstatus
Event status
Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown.
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESCtags
Comma-separated list of tags
All tags associated with the event, returned as a comma-separated string. Use tag instead to filter or group by individual tag values.
SELECT name, tags FROM tests WHERE status = 'failed'duration
Test duration in milliseconds
Execution duration of the test in milliseconds.
SELECT name, duration FROM tests WHERE status = 'passed' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY projectsource_type
Source tool type (e.g. junit, gradle)
The type of tool that produced the event (e.g. junit, gradle, pytest).
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_typesource_url
Source URL
URL pointing to the source of the event, such as a CI job or report artifact.
SELECT name, source_url FROM tests WHERE status = 'failed'collector_id
Collector identifier
Identifier of the Buildnote collector that ingested this event.
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_idcollector_source
Collector source name
Name of the source integration or pipeline step that triggered the collector.
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_sourceenvironment
Deployment target environment
Environment the deployment targeted (e.g. production, staging-eu).
SELECT environment, COUNT(*) AS total FROM deployments GROUP BY environmentproduction
Whether the deployment targeted production (true/false)
Whether the deployment targeted production. Returned as the string true or false.
SELECT COUNT(*) AS prod_deploys FROM deployments WHERE production = 'true' AND status = 'successful'category
Deployment category (release, rollback, hotfix)
Kind of deployment: release (planned), rollback (revert to a previous version), or hotfix (unplanned corrective deploy).
SELECT category, COUNT(*) AS total FROM deployments WHERE production = 'true' GROUP BY categorystarted_at
Deployment start time
Timestamp when the deployment started, formatted as a string.
SELECT environment, started_at, completed_at FROM deployments ORDER BY started_at DESC LIMIT 20completed_at
Deployment completion time
Timestamp when the deployment completed, formatted as a string. Empty while a deployment is still in progress.
SELECT environment, started_at, completed_at FROM deployments ORDER BY completed_at DESC LIMIT 20version
Deployed version or tag
Human-readable version or tag that was deployed (e.g. v1.2.3).
SELECT version, environment, completed_at FROM deployments WHERE production = 'true' ORDER BY completed_at DESCname
Deployment name or description
Human-readable name or description of the deployment.
SELECT name, version, environment FROM deployments ORDER BY completed_at DESC LIMIT 20url
Deployment URL
URL of the deployment, typically a link to the deploy page or CD tool run.
SELECT environment, url FROM deployments WHERE status = 'failed'files
Files collected during build runs
| Field | Type | Description |
|---|---|---|
timestamp | String | Event timestamp (yyyy-MM-dd HH:mm:ss.SSS) |
event_id | String | Event ID |
entity_id | String | Entity identifier (identifies same entities across builds) |
org | String | Organization identifier |
project | String | Project identifier |
module | String | Module identifier |
build | String | Build identifier |
sha | String | Git commit SHA |
ref | String | Git ref (branch or tag) |
submitter | String | Submitter identifier |
status | String | Event status |
tags | String | Comma-separated list of tags |
duration | Number | Test duration in milliseconds |
source_type | String | Source tool type (e.g. junit, gradle) |
source_url | String | Source URL |
collector_id | String | Collector identifier |
collector_source | String | Collector source name |
name | String | File name |
path | String | File path |
content_type | String | File MIME content type |
title | String | File display title |
size | Number | File size in bytes |
timestamp
Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)
Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.
SELECT timestamp FROM tests ORDER BY timestamp DESCevent_id
Event ID
Unique identifier for the event. Useful for deduplication or referencing a specific event.
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'entity_id
Entity identifier (identifies same entities across builds)
Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCmodule
Module identifier
Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESCbuild
Build identifier
Identifier of the CI/CD build run that produced this event.
SELECT build, COUNT(*) AS total, COUNTIF(duration, status = 'failed') AS failed FROM tests GROUP BY buildsha
Git commit SHA
Full or abbreviated Git commit SHA associated with the build.
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sharef
Git ref (branch or tag)
Git ref (branch name or tag) associated with the build.
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESCsubmitter
Submitter identifier
Identifier of the actor that submitted the event, typically a CI runner or user.
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitterstatus
Event status
Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown.
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESCtags
Comma-separated list of tags
All tags associated with the event, returned as a comma-separated string. Use tag instead to filter or group by individual tag values.
SELECT name, tags FROM tests WHERE status = 'failed'duration
Test duration in milliseconds
Execution duration of the test in milliseconds.
SELECT name, duration FROM tests WHERE status = 'passed' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY projectsource_type
Source tool type (e.g. junit, gradle)
The type of tool that produced the event (e.g. junit, gradle, pytest).
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_typesource_url
Source URL
URL pointing to the source of the event, such as a CI job or report artifact.
SELECT name, source_url FROM tests WHERE status = 'failed'collector_id
Collector identifier
Identifier of the Buildnote collector that ingested this event.
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_idcollector_source
Collector source name
Name of the source integration or pipeline step that triggered the collector.
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_sourcename
File name
Name of the file.
SELECT name, path FROM files ORDER BY timestamp DESC LIMIT 20path
File path
Path of the file relative to the project root.
SELECT path, content_type FROM files WHERE status = 'passed'content_type
File MIME content type
MIME type of the file (e.g. text/plain, application/json).
SELECT content_type, COUNT(*) AS total FROM files GROUP BY content_typetitle
File display title
Optional human-readable title for the file.
SELECT title, path FROM files WHERE title != ''size
File size in bytes
Size of the file in bytes.
SELECT name, size FROM files ORDER BY size DESC LIMIT 20modules
Build modules tracked across your projects
| Field | Type | Description |
|---|---|---|
org | String | Organization identifier |
project | String | Project identifier |
module | String | Module identifier |
org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCmodule
Module identifier
Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESCorgs
Organizations in your account
| Field | Type | Description |
|---|---|---|
org | String | Organization identifier |
org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectprojects
Projects within your organizations
| Field | Type | Description |
|---|---|---|
org | String | Organization identifier |
project | String | Project identifier |
org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCproperties
Custom properties submitted to builds
| Field | Type | Description |
|---|---|---|
timestamp | String | Event timestamp (yyyy-MM-dd HH:mm:ss.SSS) |
event_id | String | Event ID |
entity_id | String | Entity identifier (identifies same entities across builds) |
org | String | Organization identifier |
project | String | Project identifier |
module | String | Module identifier |
build | String | Build identifier |
sha | String | Git commit SHA |
ref | String | Git ref (branch or tag) |
submitter | String | Submitter identifier |
status | String | Event status |
tags | String | Comma-separated list of tags |
duration | Number | Test duration in milliseconds |
source_type | String | Source tool type (e.g. junit, gradle) |
source_url | String | Source URL |
collector_id | String | Collector identifier |
collector_source | String | Collector source name |
name | String | Property name |
value | String | Property value |
type | String | Property value type |
timestamp
Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)
Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.
SELECT timestamp FROM tests ORDER BY timestamp DESCevent_id
Event ID
Unique identifier for the event. Useful for deduplication or referencing a specific event.
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'entity_id
Entity identifier (identifies same entities across builds)
Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCmodule
Module identifier
Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESCbuild
Build identifier
Identifier of the CI/CD build run that produced this event.
SELECT build, COUNT(*) AS total, COUNTIF(duration, status = 'failed') AS failed FROM tests GROUP BY buildsha
Git commit SHA
Full or abbreviated Git commit SHA associated with the build.
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sharef
Git ref (branch or tag)
Git ref (branch name or tag) associated with the build.
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESCsubmitter
Submitter identifier
Identifier of the actor that submitted the event, typically a CI runner or user.
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitterstatus
Event status
Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown.
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESCtags
Comma-separated list of tags
All tags associated with the event, returned as a comma-separated string. Use tag instead to filter or group by individual tag values.
SELECT name, tags FROM tests WHERE status = 'failed'duration
Test duration in milliseconds
Execution duration of the test in milliseconds.
SELECT name, duration FROM tests WHERE status = 'passed' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY projectsource_type
Source tool type (e.g. junit, gradle)
The type of tool that produced the event (e.g. junit, gradle, pytest).
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_typesource_url
Source URL
URL pointing to the source of the event, such as a CI job or report artifact.
SELECT name, source_url FROM tests WHERE status = 'failed'collector_id
Collector identifier
Identifier of the Buildnote collector that ingested this event.
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_idcollector_source
Collector source name
Name of the source integration or pipeline step that triggered the collector.
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_sourcename
Property name
Name of the property key.
SELECT name, AVG(toNumber(value)) AS avg_value FROM properties GROUP BY namevalue
Property value
Value of the property. Always returned as a string; use toNumber(value) to apply numeric aggregations.
SELECT build, AVG(toNumber(value)) AS avg FROM properties WHERE name = 'coverage' GROUP BY buildtype
Property value type
Data type of the property value (e.g. string, number).
SELECT type, COUNT(*) AS total FROM properties GROUP BY typepull_requests
Pull requests
| Field | Type | Description |
|---|---|---|
timestamp | String | Event timestamp (yyyy-MM-dd HH:mm:ss.SSS) |
event_id | String | Event ID |
entity_id | String | Entity identifier (identifies same entities across builds) |
org | String | Organization identifier |
project | String | Project identifier |
sha | String | Git commit SHA |
ref | String | Git ref (branch or tag) |
submitter | String | Submitter identifier |
status | String | Event status |
tags | String | Comma-separated list of tags |
duration | Number | Test duration in milliseconds |
source_type | String | Source tool type (e.g. junit, gradle) |
source_url | String | Source URL |
collector_id | String | Collector identifier |
collector_source | String | Collector source name |
number | String | Pull request number |
title | String | Pull request title |
message | String | Pull request body/description |
state | String | Pull request state, as reported by the source |
source_branch | String | Source (head) branch |
target_branch | String | Target (base) branch |
author | String | Pull request author username |
url | String | Pull request URL |
merged | String | Whether the PR was merged (true/false) |
draft | String | Whether the PR is a draft (true/false) |
created_at | Number | Creation time (epoch millis) |
merged_at | Number | Merge time (epoch millis, 0 if not merged) |
closed_at | Number | Close time (epoch millis, 0 if open) |
additions | Number | Lines added |
deletions | Number | Lines deleted |
changed_files | Number | Files changed |
commits | Number | Number of commits |
comments | Number | Number of issue comments |
review_comments | Number | Number of review comments |
labels | String | Comma-separated list of labels |
timestamp
Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)
Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.
SELECT timestamp FROM tests ORDER BY timestamp DESCevent_id
Event ID
Unique identifier for the event. Useful for deduplication or referencing a specific event.
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'entity_id
Entity identifier (identifies same entities across builds)
Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCsha
Git commit SHA
Full or abbreviated Git commit SHA associated with the build.
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sharef
Git ref (branch or tag)
Git ref (branch name or tag) associated with the build.
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESCsubmitter
Submitter identifier
Identifier of the actor that submitted the event, typically a CI runner or user.
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitterstatus
Event status
Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown.
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESCtags
Comma-separated list of tags
All tags associated with the event, returned as a comma-separated string. Use tag instead to filter or group by individual tag values.
SELECT name, tags FROM tests WHERE status = 'failed'duration
Test duration in milliseconds
Execution duration of the test in milliseconds.
SELECT name, duration FROM tests WHERE status = 'passed' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY projectsource_type
Source tool type (e.g. junit, gradle)
The type of tool that produced the event (e.g. junit, gradle, pytest).
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_typesource_url
Source URL
URL pointing to the source of the event, such as a CI job or report artifact.
SELECT name, source_url FROM tests WHERE status = 'failed'collector_id
Collector identifier
Identifier of the Buildnote collector that ingested this event.
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_idcollector_source
Collector source name
Name of the source integration or pipeline step that triggered the collector.
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_sourcenumber
Pull request number
The pull request number, as assigned by the source.
SELECT number, title, state FROM pull_requests WHERE state = 'merged'title
Pull request title
Title of the pull request.
SELECT number, title FROM pull_requests WHERE state = 'open'message
Pull request body/description
Body of the pull request (the description text). Empty when the source reports none.
SELECT number, title, message FROM pull_requests WHERE state = 'open'state
Pull request state, as reported by the source
Lifecycle state of the pull request exactly as reported by the source. draft is a separate boolean flag, not a state.
SELECT state, COUNT(*) AS total FROM pull_requests GROUP BY statesource_branch
Source (head) branch
Branch the changes come from.
SELECT number, source_branch, target_branch FROM pull_requeststarget_branch
Target (base) branch
Branch the changes will be merged into.
SELECT target_branch, COUNT(*) AS total FROM pull_requests GROUP BY target_branchauthor
Pull request author username
Username of the actor that opened the pull request.
SELECT author, COUNT(*) AS total FROM pull_requests GROUP BY author ORDER BY total DESCurl
Pull request URL
Web URL of the pull request.
SELECT number, url FROM pull_requests WHERE state = 'open'merged
Whether the PR was merged (true/false)
Whether the pull request was merged. Returned as the string true or false.
SELECT COUNT(*) AS merged FROM pull_requests WHERE merged = 'true'draft
Whether the PR is a draft (true/false)
Whether the pull request is a draft. Returned as the string true or false.
SELECT number, title FROM pull_requests WHERE draft = 'true'created_at
Creation time (epoch millis)
Time the pull request was created, as epoch milliseconds. Use fromUnixTimestamp64Milli(created_at) to format.
SELECT number, created_at, merged_at FROM pull_requests WHERE merged = 'true'merged_at
Merge time (epoch millis, 0 if not merged)
Time the pull request was merged, as epoch milliseconds. 0 when the PR is not merged.
SELECT number, ((merged_at - created_at) / 1000) AS lead_secs FROM pull_requests WHERE merged = 'true'closed_at
Close time (epoch millis, 0 if open)
Time the pull request was closed, as epoch milliseconds. 0 while the PR is open.
SELECT number, closed_at FROM pull_requests WHERE state = 'closed'additions
Lines added
Number of lines added. 0 when the source does not report it.
SELECT number, additions, deletions FROM pull_requests ORDER BY additions DESCdeletions
Lines deleted
Number of lines deleted. 0 when the source does not report it.
SELECT number, deletions FROM pull_requests ORDER BY deletions DESCchanged_files
Files changed
Number of files changed. 0 when the source does not report it.
SELECT number, changed_files FROM pull_requests ORDER BY changed_files DESCcommits
Number of commits
Number of commits in the pull request. 0 when the source does not report it.
SELECT number, commits FROM pull_requests ORDER BY commits DESCcomments
Number of issue comments
Number of issue comments on the pull request. 0 when the source does not report it.
SELECT number, comments FROM pull_requests ORDER BY comments DESCreview_comments
Number of review comments
Number of review comments on the pull request. 0 when the source does not report it.
SELECT number, review_comments FROM pull_requests ORDER BY review_comments DESClabels
Comma-separated list of labels
Labels applied to the pull request, returned as a comma-separated string.
SELECT number, labels FROM pull_requests WHERE state = 'open'refs
Build refs tracked across your modules
| Field | Type | Description |
|---|---|---|
org | String | Organization identifier |
project | String | Project identifier |
module | String | Module identifier |
ref | String | Git ref (branch or tag) |
org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCmodule
Module identifier
Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESCref
Git ref (branch or tag)
Git ref (branch name or tag) associated with the build.
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESCtags
Tags tracked across your builds
| Field | Type | Description |
|---|---|---|
org | String | Organization identifier |
project | String | Project identifier |
module | String | Module identifier |
build | String | Build identifier |
tag | String | Tag associated with collected event |
org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCmodule
Module identifier
Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESCbuild
Build identifier
Identifier of the CI/CD build run that produced this event.
SELECT build, COUNT(*) AS total, COUNTIF(duration, status = 'failed') AS failed FROM tests GROUP BY buildtag
Tag associated with collected event
A single tag value from the event's tag list. Rows are expanded — one row per tag. Use for filtering or grouping by individual tags.
SELECT tag, COUNT(*) AS total FROM tests GROUP BY tag ORDER BY total DESC
SELECT * FROM tests WHERE tag = 'smoke'tests
Individual test results from build runs
| Field | Type | Description |
|---|---|---|
timestamp | String | Event timestamp (yyyy-MM-dd HH:mm:ss.SSS) |
event_id | String | Event ID |
entity_id | String | Entity identifier (identifies same entities across builds) |
org | String | Organization identifier |
project | String | Project identifier |
module | String | Module identifier |
build | String | Build identifier |
sha | String | Git commit SHA |
ref | String | Git ref (branch or tag) |
submitter | String | Submitter identifier |
status | String | Event status |
tags | String | Comma-separated list of tags |
duration | Number | Test duration in milliseconds |
source_type | String | Source tool type (e.g. junit, gradle) |
source_url | String | Source URL |
collector_id | String | Collector identifier |
collector_source | String | Collector source name |
type | String | Test category |
name | String | Test name |
class | String | Test class name |
suite | String | Test suite name |
message | String | Test failure message |
timestamp
Event timestamp (yyyy-MM-dd HH:mm:ss.SSS)
Timestamp of when the event was recorded. Format: yyyy-MM-dd HH:mm:ss.SSS. Example: 2026-05-31 07:24:41.883.
SELECT timestamp FROM tests ORDER BY timestamp DESCevent_id
Event ID
Unique identifier for the event. Useful for deduplication or referencing a specific event.
SELECT event_id, name, status FROM tests WHERE event_id = 'abc123'entity_id
Entity identifier (identifies same entities across builds)
Stable identifier that links the same logical entity (e.g. a test case) across multiple builds. Use to track history of a specific entity over time.
SELECT entity_id, build, status FROM tests WHERE entity_id = 'abc123'org
Organization identifier
Identifier of the organization that owns the data. Matches the org slug in your Buildnote workspace URL.
SELECT org, project, COUNT(*) AS total FROM tests GROUP BY org, projectproject
Project identifier
Identifier of the project within the organization.
SELECT project, AVG(duration) AS avg_dur FROM tests GROUP BY project ORDER BY avg_dur DESCmodule
Module identifier
Identifier of the module within the project. Typically maps to a build module, service, or test suite grouping.
SELECT module, COUNT(*) AS total FROM tests GROUP BY module ORDER BY total DESCbuild
Build identifier
Identifier of the CI/CD build run that produced this event.
SELECT build, COUNT(*) AS total, COUNTIF(duration, status = 'failed') AS failed FROM tests GROUP BY buildsha
Git commit SHA
Full or abbreviated Git commit SHA associated with the build.
SELECT sha, COUNT(*) AS total FROM tests WHERE ref = 'main' GROUP BY sharef
Git ref (branch or tag)
Git ref (branch name or tag) associated with the build.
SELECT ref, AVG(duration) AS avg_dur FROM tests GROUP BY ref ORDER BY avg_dur DESCsubmitter
Submitter identifier
Identifier of the actor that submitted the event, typically a CI runner or user.
SELECT submitter, COUNT(*) AS total FROM tests GROUP BY submitterstatus
Event status
Outcome of the event. Possible values: running, successful, failed, skipped, cancelled, unknown.
SELECT status, COUNT(*) AS total FROM tests GROUP BY status
SELECT * FROM tests WHERE status = 'failed' ORDER BY duration DESCtags
Comma-separated list of tags
All tags associated with the event, returned as a comma-separated string. Use tag instead to filter or group by individual tag values.
SELECT name, tags FROM tests WHERE status = 'failed'duration
Test duration in milliseconds
Execution duration of the test in milliseconds.
SELECT name, duration FROM tests WHERE status = 'passed' ORDER BY duration DESC LIMIT 20
SELECT project, P95(duration) AS p95_dur FROM tests GROUP BY projectsource_type
Source tool type (e.g. junit, gradle)
The type of tool that produced the event (e.g. junit, gradle, pytest).
SELECT source_type, COUNT(*) AS total FROM tests GROUP BY source_typesource_url
Source URL
URL pointing to the source of the event, such as a CI job or report artifact.
SELECT name, source_url FROM tests WHERE status = 'failed'collector_id
Collector identifier
Identifier of the Buildnote collector that ingested this event.
SELECT collector_id, COUNT(*) AS total FROM tests GROUP BY collector_idcollector_source
Collector source name
Name of the source integration or pipeline step that triggered the collector.
SELECT collector_source, COUNT(*) AS total FROM tests GROUP BY collector_sourcetype
Test category
Category of the test event (e.g. unit, integration, e2e).
SELECT type, COUNT(*) AS total FROM tests GROUP BY typename
Test name
Name of the individual test case.
SELECT name, status, duration FROM tests WHERE status = 'failed' ORDER BY duration DESCclass
Test class name
Fully qualified class name containing the test.
SELECT class, COUNT(*) AS failures FROM tests WHERE status = 'failed' GROUP BY class ORDER BY failures DESCsuite
Test suite name
Name of the test suite grouping the test case.
SELECT suite, AVG(duration) AS avg_dur FROM tests GROUP BY suite ORDER BY avg_dur DESCmessage
Test failure message
Failure message or error output from the test. Empty for passing tests.
SELECT name, message FROM tests WHERE status = 'failed' LIMIT 50