Core DQL syntax, pitfalls, query patterns, and query optimization. Load to write, build, fix, or OPTIMIZE a DQL query — prevents syntax errors and makes queries faster, more efficient, and cheaper (less data scanned = lower query consumption/cost per run). Covers fetch commands, data models, field namespaces, time alignment, entity/smartscape patterns, metric discovery, and performance/cost optimization (filter early, bucket filters, short time ranges, field selection, sampling, cardinality). Trigger: "write/build/fix a DQL query", "DQL syntax", "query logs/spans/metrics", "create a timeseries", "optimize my DQL", "make my query faster/cheaper", "reduce DQL cost/consumption/scanned data", "keep DQL cost under control". Do NOT use to explain an existing query or answer product questions. For MONITORING a tenant's ACTUAL query consumption/billing (how much queries cost, who scanned most, cost trends) use dt-platform-costs — this tunes the query text, not billing data.
87
93%
Does it follow best practices?
Impact
65%
1.27xAverage score across 3 eval scenarios
Passed
No findings from the security scan
DQL syntax correctness for metrics, logs, and spans queries
timeseries for metric
100%
0%
no fetch dt.metric
100%
100%
rollup: with percentile
0%
0%
rollup: inside each function
0%
0%
dt.smartscape.host grouping
0%
0%
loglevel field name
0%
0%
start_time on spans
0%
0%
bin alias in by clause
0%
0%
== for equality
100%
100%
by: curly braces
100%
100%
no rollup: in summarize
100%
100%
DQL string matching, array field idioms, and JSON extraction
matchesPhrase for tools
0%
100%
No iAny on matchesPhrase
100%
100%
parse command for JSON
0%
100%
Bracket notation for JSON field
0%
100%
getHour for time extraction
0%
100%
in() for namespace filter
0%
0%
Curly braces for array literals
0%
100%
No non-existent array functions
100%
100%
No non-existent JSON functions
100%
100%
Duration literals for time range
100%
100%
DQL query optimization for log dashboard
Filter before summarize
100%
0%
Timeframe parameter
20%
100%
Time alignment operator
0%
0%
Single countIf summarize
100%
83%
Field selection
20%
100%
Low-cardinality grouping
100%
100%
Correct command order
100%
90%
Appropriate bin size
100%
100%
Equality filter syntax
100%
100%
No unnecessary entity joins
100%
100%
dc5787d
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.