ClickHouse/dbms/tests/queries/0_stateless/00757_enum_defaults.sql

3 lines
287 B
MySQL
Raw Normal View History

2018-11-23 23:10:38 +00:00
select os_name, count() from (SELECT CAST('iphone' AS Enum8('iphone' = 1, 'android' = 2)) AS os_name) group by os_name WITH TOTALS;
select toNullable(os_name) AS os_name, count() from (SELECT CAST('iphone' AS Enum8('iphone' = 1, 'android' = 2)) AS os_name) group by os_name WITH TOTALS;