mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
18 lines
665 B
SQL
18 lines
665 B
SQL
DROP TABLE IF EXISTS empty_summing;
|
|
CREATE TABLE empty_summing (d Date, k UInt64, v Int8) ENGINE=SummingMergeTree(d, k, 8192);
|
|
|
|
INSERT INTO empty_summing VALUES ('2015-01-01', 1, 10);
|
|
INSERT INTO empty_summing VALUES ('2015-01-01', 1, -10);
|
|
|
|
OPTIMIZE TABLE empty_summing;
|
|
SELECT * FROM empty_summing;
|
|
|
|
INSERT INTO empty_summing VALUES ('2015-01-01', 1, 4),('2015-01-01', 2, -9),('2015-01-01', 3, -14);
|
|
INSERT INTO empty_summing VALUES ('2015-01-01', 1, -2),('2015-01-01', 1, -2),('2015-01-01', 3, 14);
|
|
INSERT INTO empty_summing VALUES ('2015-01-01', 1, 0),('2015-01-01', 3, 0);
|
|
|
|
OPTIMIZE TABLE empty_summing;
|
|
SELECT * FROM empty_summing;
|
|
|
|
DROP TABLE empty_summing;
|