2021-10-12 19:34:54 +00:00
|
|
|
-- Test Setup: TwoMeasurements
|
|
|
|
-- SQL: SELECT * from cpu;
|
|
|
|
+--------+--------------------------------+------+
|
|
|
|
| region | time | user |
|
|
|
|
+--------+--------------------------------+------+
|
|
|
|
| west | 1970-01-01T00:00:00.000000100Z | 23.2 |
|
|
|
|
| west | 1970-01-01T00:00:00.000000150Z | 21 |
|
|
|
|
+--------+--------------------------------+------+
|
2021-11-04 15:04:03 +00:00
|
|
|
-- SQL: SELECT min(region) from cpu;
|
|
|
|
+-----------------+
|
|
|
|
| MIN(cpu.region) |
|
|
|
|
+-----------------+
|
|
|
|
| west |
|
|
|
|
+-----------------+
|
2022-08-29 19:10:00 +00:00
|
|
|
-- SQL: SELECT "user", region from cpu;
|
2021-10-12 19:34:54 +00:00
|
|
|
+------+--------+
|
|
|
|
| user | region |
|
|
|
|
+------+--------+
|
|
|
|
| 23.2 | west |
|
|
|
|
| 21 | west |
|
|
|
|
+------+--------+
|
|
|
|
-- SQL: SELECT * from cpu where time > to_timestamp('1970-01-01T00:00:00.000000120+00:00');
|
|
|
|
+--------+--------------------------------+------+
|
|
|
|
| region | time | user |
|
|
|
|
+--------+--------------------------------+------+
|
|
|
|
| west | 1970-01-01T00:00:00.000000150Z | 21 |
|
|
|
|
+--------+--------------------------------+------+
|
2022-08-29 19:10:00 +00:00
|
|
|
-- SQL: SELECT "user", region from cpu where time > to_timestamp('1970-01-01T00:00:00.000000120+00:00');
|
2021-10-12 19:34:54 +00:00
|
|
|
+------+--------+
|
|
|
|
| user | region |
|
|
|
|
+------+--------+
|
|
|
|
| 21 | west |
|
|
|
|
+------+--------+
|
|
|
|
-- SQL: SELECT count(*) from cpu group by region;
|
|
|
|
+-----------------+
|
|
|
|
| COUNT(UInt8(1)) |
|
|
|
|
+-----------------+
|
|
|
|
| 2 |
|
|
|
|
+-----------------+
|
|
|
|
-- SQL: SELECT * from disk;
|
|
|
|
+-------+--------+--------------------------------+
|
|
|
|
| bytes | region | time |
|
|
|
|
+-------+--------+--------------------------------+
|
|
|
|
| 99 | east | 1970-01-01T00:00:00.000000200Z |
|
|
|
|
+-------+--------+--------------------------------+
|