ClickHouse/tests/queries/0_stateless/01268_mergine_sorted_limit.sql
alexey-milovidov b33fd6f2ee
Trigger CI
2020-05-06 05:15:57 +03:00

13 lines
312 B
SQL

DROP TABLE IF EXISTS tab;
CREATE TABLE tab (x UInt32, y UInt32) ENGINE = MergeTree() ORDER BY x;
INSERT INTO tab VALUES (1,1),(1,2),(1,3),(1,4),(1,5);
INSERT INTO tab VALUES (2,6),(2,7),(2,8),(2,9),(2,0);
SELECT * FROM tab ORDER BY x LIMIT 3;
SELECT * FROM tab ORDER BY x LIMIT 4;
DROP TABLE IF EXISTS tab;