ClickHouse/tests/queries/0_stateless/00804_rollup_with_having.sql

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

15 lines
550 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS rollup_having;
CREATE TABLE rollup_having (
a Nullable(String),
b Nullable(String)
) ENGINE = Memory;
INSERT INTO rollup_having VALUES (NULL, NULL);
INSERT INTO rollup_having VALUES ('a', NULL);
INSERT INTO rollup_having VALUES ('a', 'b');
2022-06-16 10:25:39 +00:00
SELECT a, b, count(*) as count FROM rollup_having GROUP BY a, b WITH ROLLUP HAVING a IS NOT NULL ORDER BY a, b, count;
SELECT a, b, count(*) as count FROM rollup_having GROUP BY a, b WITH ROLLUP HAVING a IS NOT NULL and b IS NOT NULL ORDER BY a, b, count;
2019-01-16 00:20:36 +00:00
DROP TABLE rollup_having;