ClickHouse/tests/queries/0_stateless/03258_multiple_array_joins.sql
2024-10-30 21:20:11 +01:00

26 lines
717 B
SQL

SET enable_analyzer = 1;
DROP TABLE IF EXISTS test_multiple_array_join;
CREATE TABLE test_multiple_array_join (
id UInt64,
person Nested (
name String,
surname String
),
properties Nested (
key String,
value String
)
) Engine=MergeTree ORDER BY id;
INSERT INTO test_multiple_array_join VALUES (1, ['Thomas', 'Michel'], ['Aquinas', 'Foucault'], ['profession', 'alive'], ['philosopher', 'no']);
INSERT INTO test_multiple_array_join VALUES (2, ['Thomas', 'Nicola'], ['Edison', 'Tesla'], ['profession', 'alive'], ['inventor', 'no']);
SELECT *
FROM test_multiple_array_join
ARRAY JOIN person
ARRAY JOIN properties
ORDER BY ALL;
DROP TABLE test_multiple_array_join;