mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
7 lines
271 B
SQL
7 lines
271 B
SQL
DROP TABLE IF EXISTS enum_totals;
|
|
CREATE TABLE enum_totals (e Enum8('hello' = 1, 'world' = 2)) ENGINE = Memory;
|
|
INSERT INTO enum_totals VALUES ('hello'), ('world'), ('world');
|
|
|
|
SELECT e, count() FROM enum_totals GROUP BY e WITH TOTALS ORDER BY e;
|
|
DROP TABLE enum_totals;
|