mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
13 lines
459 B
SQL
13 lines
459 B
SQL
DROP TABLE if exists lc;
|
|
CREATE TABLE lc (a LowCardinality(Nullable(String)), b LowCardinality(Nullable(String))) ENGINE = MergeTree order by tuple();
|
|
INSERT INTO lc VALUES ('a', 'b');
|
|
INSERT INTO lc VALUES ('c', 'd');
|
|
|
|
SELECT a, b, count(a) FROM lc GROUP BY a, b WITH ROLLUP;
|
|
SELECT a, count(a) FROM lc GROUP BY a WITH ROLLUP;
|
|
|
|
SELECT a, b, count(a) FROM lc GROUP BY a, b WITH CUBE;
|
|
SELECT a, count(a) FROM lc GROUP BY a WITH CUBE;
|
|
|
|
DROP TABLE if exists lc;
|