array_zip()

Zips k LISTs to a new LIST whose length will be that of the longest list. Its elements are structs of k elements from each list list_1, …, list_k, missing elements are replaced with NULL. If truncate is set, all lists are truncated to the smallest list length.

Alias of list_zip()

Arguments & returns

array_zip(…)

Scalar
Overload link … Varargs Returns
#01 ANY STRUCT[]

… accepts a variable number of arguments of the type shown.

Example

2 more ↓
array_zip example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

More examples

array_zip example 2
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

array_zip example 3
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

Catalog examples

SELECT
  list_zip([1, 2], [3, 4], [5, 6]);