ClickHouse/tests/queries/0_stateless/03094_analyzer_fiddle_multiif.sql

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

17 lines
398 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS users_03094;
CREATE TABLE users_03094 (name String, age Int16) ENGINE=Memory;
INSERT INTO users_03094 VALUES ('John', 33);
INSERT INTO users_03094 VALUES ('Ksenia', 48);
INSERT INTO users_03094 VALUES ('Alice', 50);
2024-07-12 12:49:26 +00:00
SET enable_analyzer=1;
SELECT
multiIf((age > 30) or (true), '1', '2') AS a,
max(name)
FROM users_03094
GROUP BY a;
DROP TABLE IF EXISTS users_03094;