ClickHouse/tests/queries/0_stateless/00411_merge_tree_where_const_in_set.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

13 lines
681 B
SQL

DROP TABLE IF EXISTS const_in_const;
CREATE TABLE const_in_const (id UInt64, date Date, uid UInt32, name String, Sign Int8) ENGINE = CollapsingMergeTree(date, intHash32(uid), (id, date, intHash32(uid)), 8192, Sign);
INSERT INTO const_in_const VALUES(1, now(), 1, 'test1', 1);
INSERT INTO const_in_const VALUES(2, now(), 1, 'test2', 1);
INSERT INTO const_in_const VALUES(3, now(), 1, 'test3', 1);
INSERT INTO const_in_const VALUES(4, now(), 2, 'test4', 1);
INSERT INTO const_in_const VALUES(5, now(), 3, 'test5', 1);
SELECT 1 from const_in_const where 42 in (225);
SELECT name FROM const_in_const WHERE 1 IN (125, 1, 2) ORDER BY name LIMIT 1;
DROP TABLE IF EXISTS const_in_const;