ClickHouse/dbms/tests/queries/0_stateless/00931_low_cardinality_nullable_aggregate_function_type.sql

9 lines
344 B
MySQL
Raw Normal View History

drop table if exists lc;
2019-04-05 16:51:27 +00:00
CREATE TABLE lc (`date` Date, `name` LowCardinality(Nullable(String)), `clicks` Nullable(Int32)) ENGINE = MergeTree() ORDER BY date SETTINGS index_granularity = 8192;
INSERT INTO lc SELECT '2019-01-01', null, 0 FROM numbers(1000000);
SELECT date, argMax(name, clicks) FROM lc GROUP BY date;
2019-04-05 16:51:27 +00:00
drop table if exists lc;
2019-04-05 16:51:27 +00:00