mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 03:42:48 +00:00
20 lines
354 B
SQL
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;
|