ClickHouse/tests/queries/0_stateless/02512_array_join_name_resolution.sql
2022-12-19 08:51:09 +01:00

20 lines
354 B
SQL

DROP TABLE IF EXISTS x;
CREATE TABLE x ( `arr.key` Array(String), `arr.value` Array(String), `n` String ) ENGINE = Memory;
INSERT INTO x VALUES (['Hello', 'World'], ['abc', 'def'], 'test');
SELECT
key,
any(toString(n))
FROM
(
SELECT
arr.key AS key,
n
FROM x
ARRAY JOIN arr
)
GROUP BY key
ORDER BY key;
DROP TABLE x;