mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-11 18:14:03 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
19 lines
745 B
SQL
19 lines
745 B
SQL
DROP TABLE IF EXISTS count;
|
|
|
|
CREATE TABLE count (x UInt64) ENGINE = MergeTree ORDER BY tuple();
|
|
INSERT INTO count SELECT * FROM numbers(1234567);
|
|
|
|
SELECT count() FROM count;
|
|
SELECT count() * 2 FROM count;
|
|
SELECT count() FROM (SELECT * FROM count UNION ALL SELECT * FROM count);
|
|
SELECT count() FROM count WITH TOTALS;
|
|
SELECT arrayJoin([count(), count()]) FROM count;
|
|
SELECT arrayJoin([count(), count()]) FROM count LIMIT 1;
|
|
SELECT arrayJoin([count(), count()]) FROM count LIMIT 1, 1;
|
|
SELECT arrayJoin([count(), count()]) AS x FROM count LIMIT 1 BY x;
|
|
SELECT arrayJoin([count(), count() + 1]) AS x FROM count LIMIT 1 BY x;
|
|
SELECT count() FROM count HAVING count() = 1234567;
|
|
SELECT count() FROM count HAVING count() != 1234567;
|
|
|
|
DROP TABLE count;
|