ClickHouse/tests/queries/0_stateless/00543_null_and_prewhere.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
410 B
MySQL
Raw Normal View History

2022-06-23 08:37:52 +00:00
set allow_deprecated_syntax_for_merge_tree=1;
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;