Skip to main content

ARRAYS_ZIP

Introduced or updated: v1.2.690

Merges multiple arrays into a single array tuple.

Syntax​

ARRAYS_ZIP( <array1> [, ...] )

Arguments​

ArgumentsDescription
<arrayN>The input ARRAYs.
note
  • The length of each array must be the same.

Return Type​

Array(Tuple).

Examples​

SELECT ARRAYS_ZIP([1, 2, 3], ['a', 'b', 'c']);
┌────────────────────────────────────────┐
│ arrays_zip([1, 2, 3], ['a', 'b', 'c']) │
├────────────────────────────────────────┤
│ [(1,'a'),(2,'b'),(3,'c')] │
└────────────────────────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today