mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-06 06:22:39 +00:00
14 lines
369 B
SQL
14 lines
369 B
SQL
-- https://github.com/ClickHouse/ClickHouse/issues/59101
|
|
SET allow_experimental_analyzer = 1;
|
|
|
|
CREATE TABLE users (name String, age Int16) ENGINE=Memory;
|
|
INSERT INTO users VALUES ('John', 33);
|
|
INSERT INTO users VALUES ('Ksenia', 48);
|
|
INSERT INTO users VALUES ('Alice', 50);
|
|
|
|
SELECT
|
|
multiIf((age > 30) or (true), '1', '2') AS a,
|
|
max(name)
|
|
FROM users
|
|
GROUP BY a;
|