You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
660 B
23 lines
660 B
CREATE TABLE IF NOT EXISTS traderepublic.quotes
|
|
(
|
|
isin String,
|
|
minute_start DateTime,
|
|
last_record_timestamp AggregateFunction(max, DateTime),
|
|
first_value AggregateFunction(argMin, Int64, DateTime),
|
|
last_value AggregateFunction(argMax, Int64, DateTime),
|
|
min_value AggregateFunction(min, Int64),
|
|
max_value AggregateFunction(max, Int64)
|
|
) ENGINE = AggregatingMergeTree()
|
|
PARTITION BY isin
|
|
ORDER BY (isin, minute_start);
|
|
|
|
CREATE TABLE IF NOT EXISTS traderepublic.symbols
|
|
(
|
|
isin String,
|
|
description String,
|
|
status Int8,
|
|
added_on DateTime
|
|
) ENGINE = CollapsingMergeTree(status)
|
|
PARTITION BY isin
|
|
ORDER BY (isin, added_on)
|