ATTACH TABLE _ UUID '0e537e38-f8ff-476e-967b-0a1155c3d125'
(
    `timeseries_name` String,
    `timeseries_key` UInt64,
    `start_time` DateTime64(9, 'UTC'),
    `timestamp` DateTime64(9, 'UTC'),
    `bins` Array(Float32),
    `counts` Array(UInt64),
    `min` Float32,
    `max` Float32,
    `sum_of_samples` Float64,
    `squared_mean` Float64,
    `p50_marker_heights` Array(Float64),
    `p50_marker_positions` Array(UInt64),
    `p50_desired_marker_positions` Array(Float64),
    `p90_marker_heights` Array(Float64),
    `p90_marker_positions` Array(UInt64),
    `p90_desired_marker_positions` Array(Float64),
    `p99_marker_heights` Array(Float64),
    `p99_marker_positions` Array(UInt64),
    `p99_desired_marker_positions` Array(Float64)
)
ENGINE = MergeTree
ORDER BY (timeseries_name, timeseries_key, start_time, timestamp)
TTL toDateTime(timestamp) + toIntervalDay(30)
SETTINGS index_granularity = 8192
