ClickHouse/tests/queries/0_stateless/03230_anyHeavy_merge.sql

5 lines
303 B
SQL

DROP TABLE IF EXISTS t;
CREATE TABLE t (letter String) ENGINE=MergeTree order by () partition by letter;
INSERT INTO t VALUES ('a'), ('a'), ('a'), ('a'), ('b'), ('a'), ('a'), ('a'), ('a'), ('a'), ('a'), ('a'), ('a'), ('a'), ('a'), ('a'), ('c');
SELECT anyHeavy(if(letter != 'b', letter, NULL)) FROM t;