ClickHouse/dbms/tests/queries/0_stateless/00388_enum_with_totals.sql

7 lines
271 B
MySQL
Raw Normal View History

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');
2016-11-18 08:31:46 +00:00
SELECT e, count() FROM enum_totals GROUP BY e WITH TOTALS ORDER BY e;
DROP TABLE enum_totals;