influxdb/query_tests/cases/in/delete_three_delete_three_c...

284 lines
10 KiB
Plaintext

-- Test Setup: ThreeDeleteThreeChunks
-- SQL: SELECT * from cpu order by foo, bar, time;
+-----+-----+--------------------------------+
| bar | foo | time |
+-----+-----+--------------------------------+
| 1 | me | 1970-01-01T00:00:00.000000040Z |
| 1 | me | 1970-01-01T00:00:00.000000042Z |
| 1 | me | 1970-01-01T00:00:00.000000062Z |
| 4 | me | 1970-01-01T00:00:00.000000050Z |
| 5 | me | 1970-01-01T00:00:00.000000060Z |
| 7 | me | 1970-01-01T00:00:00.000000080Z |
| 3 | you | 1970-01-01T00:00:00.000000070Z |
+-----+-----+--------------------------------+
-- SQL: SELECT time, bar from cpu order by bar, time;
+--------------------------------+-----+
| time | bar |
+--------------------------------+-----+
| 1970-01-01T00:00:00.000000040Z | 1 |
| 1970-01-01T00:00:00.000000042Z | 1 |
| 1970-01-01T00:00:00.000000062Z | 1 |
| 1970-01-01T00:00:00.000000070Z | 3 |
| 1970-01-01T00:00:00.000000050Z | 4 |
| 1970-01-01T00:00:00.000000060Z | 5 |
| 1970-01-01T00:00:00.000000080Z | 7 |
+--------------------------------+-----+
-- SQL: SELECT bar from cpu order by bar;
+-----+
| bar |
+-----+
| 1 |
| 1 |
| 1 |
| 3 |
| 4 |
| 5 |
| 7 |
+-----+
-- SQL: SELECT count(time) as t, count(*) as c, count(bar) as b, min(bar) as mi, min(time) as mt, max(time) as mat from cpu order by t, c, b, mi, mt, mat;
+---+---+---+----+--------------------------------+--------------------------------+
| t | c | b | mi | mt | mat |
+---+---+---+----+--------------------------------+--------------------------------+
| 7 | 7 | 7 | 1 | 1970-01-01T00:00:00.000000040Z | 1970-01-01T00:00:00.000000080Z |
+---+---+---+----+--------------------------------+--------------------------------+
-- SQL: SELECT count(time) from cpu;
+-----------------+
| COUNT(cpu.time) |
+-----------------+
| 7 |
+-----------------+
-- SQL: SELECT count(foo) from cpu;
+----------------+
| COUNT(cpu.foo) |
+----------------+
| 7 |
+----------------+
-- SQL: SELECT count(bar) from cpu;
+----------------+
| COUNT(cpu.bar) |
+----------------+
| 7 |
+----------------+
-- SQL: SELECT count(*) from cpu;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 7 |
+-----------------+
-- SQL: SELECT min(bar) from cpu;
+--------------+
| MIN(cpu.bar) |
+--------------+
| 1 |
+--------------+
-- SQL: SELECT foo from cpu order by foo;
+-----+
| foo |
+-----+
| me |
| me |
| me |
| me |
| me |
| me |
| you |
+-----+
-- SQL: SELECT min(foo) from cpu;
+--------------+
| MIN(cpu.foo) |
+--------------+
| me |
+--------------+
-- SQL: SELECT max(foo) from cpu;
+--------------+
| MAX(cpu.foo) |
+--------------+
| you |
+--------------+
-- SQL: SELECT min(time) from cpu;
+--------------------------------+
| MIN(cpu.time) |
+--------------------------------+
| 1970-01-01T00:00:00.000000040Z |
+--------------------------------+
-- SQL: SELECT max(time) from cpu;
+--------------------------------+
| MAX(cpu.time) |
+--------------------------------+
| 1970-01-01T00:00:00.000000080Z |
+--------------------------------+
-- SQL: SELECT foo, min(time) from cpu group by foo;
+-----+--------------------------------+
| foo | MIN(cpu.time) |
+-----+--------------------------------+
| me | 1970-01-01T00:00:00.000000040Z |
| you | 1970-01-01T00:00:00.000000070Z |
+-----+--------------------------------+
-- SQL: SELECT bar, max(time) as max_time from cpu group by bar order by bar, max_time;
+-----+--------------------------------+
| bar | max_time |
+-----+--------------------------------+
| 1 | 1970-01-01T00:00:00.000000062Z |
| 3 | 1970-01-01T00:00:00.000000070Z |
| 4 | 1970-01-01T00:00:00.000000050Z |
| 5 | 1970-01-01T00:00:00.000000060Z |
| 7 | 1970-01-01T00:00:00.000000080Z |
+-----+--------------------------------+
-- SQL: SELECT max(time) as max_time from cpu group by bar order by max_time;
+--------------------------------+
| max_time |
+--------------------------------+
| 1970-01-01T00:00:00.000000050Z |
| 1970-01-01T00:00:00.000000060Z |
| 1970-01-01T00:00:00.000000062Z |
| 1970-01-01T00:00:00.000000070Z |
| 1970-01-01T00:00:00.000000080Z |
+--------------------------------+
-- SQL: SELECT time from cpu order by time;
+--------------------------------+
| time |
+--------------------------------+
| 1970-01-01T00:00:00.000000040Z |
| 1970-01-01T00:00:00.000000042Z |
| 1970-01-01T00:00:00.000000050Z |
| 1970-01-01T00:00:00.000000060Z |
| 1970-01-01T00:00:00.000000062Z |
| 1970-01-01T00:00:00.000000070Z |
| 1970-01-01T00:00:00.000000080Z |
+--------------------------------+
-- SQL: SELECT max(bar) from cpu;
+--------------+
| MAX(cpu.bar) |
+--------------+
| 7 |
+--------------+
-- SQL: SELECT min(time), max(time) from cpu;
+--------------------------------+--------------------------------+
| MIN(cpu.time) | MAX(cpu.time) |
+--------------------------------+--------------------------------+
| 1970-01-01T00:00:00.000000040Z | 1970-01-01T00:00:00.000000080Z |
+--------------------------------+--------------------------------+
-- SQL: SELECT * from cpu where bar != 1.0 order by bar, foo, time;
+-----+-----+--------------------------------+
| bar | foo | time |
+-----+-----+--------------------------------+
| 3 | you | 1970-01-01T00:00:00.000000070Z |
| 4 | me | 1970-01-01T00:00:00.000000050Z |
| 5 | me | 1970-01-01T00:00:00.000000060Z |
| 7 | me | 1970-01-01T00:00:00.000000080Z |
+-----+-----+--------------------------------+
-- SQL: SELECT * from cpu where foo = 'me' and bar > 2.0 order by bar, foo, time;
+-----+-----+--------------------------------+
| bar | foo | time |
+-----+-----+--------------------------------+
| 4 | me | 1970-01-01T00:00:00.000000050Z |
| 5 | me | 1970-01-01T00:00:00.000000060Z |
| 7 | me | 1970-01-01T00:00:00.000000080Z |
+-----+-----+--------------------------------+
-- SQL: SELECT * from cpu where bar = 1 order by bar, foo, time;
+-----+-----+--------------------------------+
| bar | foo | time |
+-----+-----+--------------------------------+
| 1 | me | 1970-01-01T00:00:00.000000040Z |
| 1 | me | 1970-01-01T00:00:00.000000042Z |
| 1 | me | 1970-01-01T00:00:00.000000062Z |
+-----+-----+--------------------------------+
-- SQL: SELECT * from cpu where foo = 'me' and (bar > 2 or bar = 1.0) order by bar, foo, time;
+-----+-----+--------------------------------+
| bar | foo | time |
+-----+-----+--------------------------------+
| 1 | me | 1970-01-01T00:00:00.000000040Z |
| 1 | me | 1970-01-01T00:00:00.000000042Z |
| 1 | me | 1970-01-01T00:00:00.000000062Z |
| 4 | me | 1970-01-01T00:00:00.000000050Z |
| 5 | me | 1970-01-01T00:00:00.000000060Z |
| 7 | me | 1970-01-01T00:00:00.000000080Z |
+-----+-----+--------------------------------+
-- SQL: SELECT * from cpu where foo = 'you' and (bar > 3.0 or bar = 1) order by bar, foo, time;
++
++
-- SQL: SELECT min(bar) from cpu where foo = 'me' and (bar > 2 or bar = 1.0);
+--------------+
| MIN(cpu.bar) |
+--------------+
| 1 |
+--------------+
-- SQL: SELECT max(foo) from cpu where foo = 'me' and (bar > 2 or bar = 1.0);
+--------------+
| MAX(cpu.foo) |
+--------------+
| me |
+--------------+
-- SQL: SELECT min(time) from cpu where foo = 'me' and (bar > 2 or bar = 1.0);
+--------------------------------+
| MIN(cpu.time) |
+--------------------------------+
| 1970-01-01T00:00:00.000000040Z |
+--------------------------------+
-- SQL: SELECT count(bar) from cpu where foo = 'me' and (bar > 2 or bar = 1.0);
+----------------+
| COUNT(cpu.bar) |
+----------------+
| 6 |
+----------------+
-- SQL: SELECT count(time) from cpu where foo = 'me' and (bar > 2 or bar = 1.0);
+-----------------+
| COUNT(cpu.time) |
+-----------------+
| 6 |
+-----------------+
-- SQL: SELECT count(*) from cpu where foo = 'me' and (bar > 2 or bar = 1.0);
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 6 |
+-----------------+
-- SQL: SELECT * from cpu where bar >= 1.0 order by bar, foo, time;
+-----+-----+--------------------------------+
| bar | foo | time |
+-----+-----+--------------------------------+
| 1 | me | 1970-01-01T00:00:00.000000040Z |
| 1 | me | 1970-01-01T00:00:00.000000042Z |
| 1 | me | 1970-01-01T00:00:00.000000062Z |
| 3 | you | 1970-01-01T00:00:00.000000070Z |
| 4 | me | 1970-01-01T00:00:00.000000050Z |
| 5 | me | 1970-01-01T00:00:00.000000060Z |
| 7 | me | 1970-01-01T00:00:00.000000080Z |
+-----+-----+--------------------------------+
-- SQL: SELECT foo from cpu where bar >= 1.0 order by foo;
+-----+
| foo |
+-----+
| me |
| me |
| me |
| me |
| me |
| me |
| you |
+-----+
-- SQL: SELECT time, bar from cpu where bar >= 1.0 order by bar, time;
+--------------------------------+-----+
| time | bar |
+--------------------------------+-----+
| 1970-01-01T00:00:00.000000040Z | 1 |
| 1970-01-01T00:00:00.000000042Z | 1 |
| 1970-01-01T00:00:00.000000062Z | 1 |
| 1970-01-01T00:00:00.000000070Z | 3 |
| 1970-01-01T00:00:00.000000050Z | 4 |
| 1970-01-01T00:00:00.000000060Z | 5 |
| 1970-01-01T00:00:00.000000080Z | 7 |
+--------------------------------+-----+
-- SQL: SELECT * from cpu where foo = 'you' order by bar, foo, time;
+-----+-----+--------------------------------+
| bar | foo | time |
+-----+-----+--------------------------------+
| 3 | you | 1970-01-01T00:00:00.000000070Z |
+-----+-----+--------------------------------+
-- SQL: SELECT min(bar) as mi, max(time) as ma from cpu where foo = 'you' order by mi, ma;
+----+--------------------------------+
| mi | ma |
+----+--------------------------------+
| 3 | 1970-01-01T00:00:00.000000070Z |
+----+--------------------------------+