mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-12 16:32:16 +00:00
15 lines
520 B
SQL
15 lines
520 B
SQL
CREATE TABLE avg1_states (
|
|
seq_id INT PRIMARY KEY,
|
|
state BINARY,
|
|
ts TIMESTAMP TIME INDEX
|
|
);
|
|
|
|
-- AVG1: magic (4 bytes), little-endian u64 count, little-endian f64 sum.
|
|
INSERT INTO avg1_states (seq_id, state, ts) VALUES
|
|
(1, X'4156473102000000000000000000000000000840', '2026-01-01 00:00:00'),
|
|
(2, X'4156473101000000000000000000000000001840', '2026-01-01 00:00:01'),
|
|
(3, NULL, '2026-01-01 00:00:02'),
|
|
(4, X'4156473100000000000000000000000000000000', '2026-01-01 00:00:03');
|
|
|
|
ADMIN FLUSH_TABLE('avg1_states');
|