list_zip
Pair up items by position from two or more lists, returning a list of structs. Shorter lists are padded with missing values unless you set truncate, which stops at the shortest list.
Also available as array_zip.
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
list_zip([1, 2], [3, 4], [5, 6])Result
'[(1, 3, 5), (2, 4, 6)]'The expression returns STRUCT(INTEGER, INTEGER, INTEGER)[]. Formula stores it as VARCHAR in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
list_zip(...)Supported signatures (1)
list_zip(...: ANY) → STRUCT[]The result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
With a missing first argument
list_zip(NULL::INTEGER[], [3, 4], [5, 6])'[(NULL, 3, 5), (NULL, 4, 6)]'
Function metadata from DuckDB, used under the MIT license.