ClickHouse/tests/queries/0_stateless/01710_projection_with_nullable_keys.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
319 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS sales;
CREATE TABLE sales (DATE_SOLD DateTime64(3, 'UTC'), PRODUCT_ID Nullable(String)) Engine MergeTree() PARTITION BY toYYYYMM(DATE_SOLD) ORDER BY DATE_SOLD;
ALTER TABLE sales ADD PROJECTION test (SELECT toInt64(COUNT(*)) GROUP BY PRODUCT_ID, DATE_SOLD);
SHOW CREATE sales;
DROP TABLE sales;