ClickHouse/tests/queries/0_stateless/02515_projections_with_totals.sql

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

11 lines
376 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS t;
CREATE TABLE t (x UInt8, PROJECTION p (SELECT x GROUP BY x)) ENGINE = MergeTree ORDER BY ();
INSERT INTO t VALUES (0);
SET group_by_overflow_mode = 'any', max_rows_to_group_by = 1000, totals_mode = 'after_having_auto';
SELECT x FROM t GROUP BY x WITH TOTALS;
2023-02-21 15:44:50 +00:00
SET optimize_aggregation_in_order=1;
SELECT x FROM t GROUP BY x WITH TOTALS;
DROP TABLE t;