Use these SQL++ examples to extract targeted results from system:completed_requests — by node, by date range, and by excluding system-generated statements —
so you can focus on the most relevant queries during analysis.
Common Filters
Remove system-level queries
SELECT
*,
meta().plan
FROM
system:completed_requests
WHERE
clientContextID NOT LIKE 'INTERNAL-%' AND
UPPER(IFMISSING(preparedText, statement)) NOT LIKE 'INFER %' AND
UPPER(IFMISSING(preparedText, statement)) NOT LIKE 'ADVISE %' AND
UPPER(IFMISSING(preparedText, statement)) NOT LIKE 'CREATE %' AND
UPPER(IFMISSING(preparedText, statement)) NOT LIKE 'CREATE INDEX%' AND
UPPER(IFMISSING(preparedText, statement)) NOT LIKE 'ALTER INDEX%' AND
UPPER(IFMISSING(preparedText, statement)) NOT LIKE '% SYSTEM:%'
LIMIT
2000;
Search within SQL strings
SELECT
*,
meta().plan
FROM
system:completed_requests
WHERE
CONTAINS(`statement`,"SELECT *")
OR
CONTAINS(preparedText,"SELECT *")
ORDER BY
requestId
LIMIT
2000;
Between two dates
SELECT
*,
meta().plan
FROM
system:completed_requests
WHERE
requestTime BETWEEN "2025-06-01" AND "2025-08-02";
By Node
Current query node
SELECT
*,
meta().plan
FROM
system:completed_requests
WHERE
node = NODE_NAME()
LIMIT
2000;
Specific query node
SELECT
*,
meta().plan
FROM
system:completed_requests
WHERE
node LIKE "10.132.133.165%"
LIMIT
2000;
Source: sql_queries.md. For broader guidance, see the
Analysis Hub
or return to the Analyzer.