mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
31 lines
1.1 KiB
SQL
31 lines
1.1 KiB
SQL
SET allow_experimental_analyzer = 1;
|
|
|
|
-- { echoOn }
|
|
SET limit = 0;
|
|
|
|
SELECT * FROM numbers(10);
|
|
SELECT * FROM numbers(10) SETTINGS limit=5, offset=2;
|
|
SELECT count(*) FROM (SELECT * FROM numbers(10));
|
|
SELECT count(*) FROM (SELECT * FROM numbers(10) SETTINGS limit=5);
|
|
SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5;
|
|
SELECT count(*) FROM view(SELECT * FROM numbers(10));
|
|
SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5);
|
|
SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5;
|
|
|
|
SET limit = 3;
|
|
SELECT * FROM numbers(10);
|
|
SELECT * FROM numbers(10) SETTINGS limit=5, offset=2;
|
|
SELECT count(*) FROM (SELECT * FROM numbers(10));
|
|
SELECT count(*) FROM (SELECT * FROM numbers(10) SETTINGS limit=5);
|
|
SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5;
|
|
SELECT count(*) FROM view(SELECT * FROM numbers(10));
|
|
SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5);
|
|
SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5;
|
|
|
|
SET limit = 4;
|
|
SET offset = 1;
|
|
SELECT * FROM numbers(10);
|
|
SELECT * FROM numbers(10) LIMIT 3 OFFSET 2;
|
|
SELECT * FROM numbers(10) LIMIT 5 OFFSET 2;
|
|
-- { echoOff }
|