1
CREATE TABLE dst (`key` Int64, `value` String)
ENGINE = MergeTree ORDER BY tuple()
SETTINGS non_replicated_deduplication_window=1000;
CREATE TABLE mv_dst (`key` Int64, `value` String)
ENGINE = MergeTree ORDER BY tuple()
SETTINGS non_replicated_deduplication_window=1000;
CREATE MATERIALIZED VIEW mv_first TO mv_dst
AS SELECT 0 AS key, value AS value FROM dst;
CREATE MATERIALIZED VIEW mv_second TO mv_dst
AS SELECT 0 AS key, value AS value FROM dst;
INSERT INTO dst SELECT number as key, toString(number) from numbers(1000);
INSERT INTO dst SELECT number as key, toString(number) from numbers(1000);
DROP TABLE IF EXISTS dst
DROP TABLE IF EXISTS mv_dst
DROP TABLE IF EXISTS mv_first
DROP TABLE IF EXISTS mv_second