-- A subquery without a step uses the evaluation interval (one minute by -- default in Prometheus), not the query step. Expected results are from Prometheus 3. create table subquery_default_step ( ts timestamp time index, val double, host string primary key ); Affected Rows: 0 insert into subquery_default_step values (0, 1.0, 'a'), (60000, 1.0, 'a'), (120000, 1.0, 'a'), (180000, 1.0, 'a'), (240000, 1.0, 'a'), (300000, 1.0, 'a'); Affected Rows: 6 tql eval (300, 300, '1s') count_over_time(subquery_default_step[5m:]); +---------------------+------------------------------------+------+ | ts | prom_count_over_time(ts_range,val) | host | +---------------------+------------------------------------+------+ | 1970-01-01T00:05:00 | 5.0 | a | +---------------------+------------------------------------+------+ tql eval (300, 300, '1s') count_over_time(subquery_default_step[5m:30s]); +---------------------+------------------------------------+------+ | ts | prom_count_over_time(ts_range,val) | host | +---------------------+------------------------------------+------+ | 1970-01-01T00:05:00 | 10.0 | a | +---------------------+------------------------------------+------+ -- The outer range query keeps its own step around the subquery's default step. tql eval (300, 360, '15s') count_over_time(subquery_default_step[5m:]); +---------------------+------------------------------------+------+ | ts | prom_count_over_time(ts_range,val) | host | +---------------------+------------------------------------+------+ | 1970-01-01T00:05:00 | 5.0 | a | | 1970-01-01T00:05:15 | 5.0 | a | | 1970-01-01T00:05:30 | 5.0 | a | | 1970-01-01T00:05:45 | 5.0 | a | | 1970-01-01T00:06:00 | 5.0 | a | +---------------------+------------------------------------+------+ drop table subquery_default_step; Affected Rows: 0