ClickHouse/tests/queries/0_stateless/00543_null_and_prewhere.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

18 lines
363 B
SQL

CREATE TABLE test
(
dt Date,
id UInt32,
val Nullable(UInt32)
)
ENGINE = MergeTree(dt, id, 8192);
insert into test (dt, id, val) values ('2017-01-01', 1, 10);
insert into test (dt, id, val) values ('2017-01-01', 1, null);
insert into test (dt, id, val) values ('2017-01-01', 1, 0);
SELECT count()
FROM test
WHERE val = 0;
DROP TABLE IF EXISTS test;