9951 explained code solutions for 126 technologies


clickhouseArray zip example


SELECT arrayZip([1, 2], ['Donald', 'Joe'])ctrl + c
arrayZip

will join 2 arrays into array of tuples of corresponding values

[1, 2]

first array

['Donald', 'Joe']

second array


Usage example

SELECT arrayZip([1, 2], ['Donald', 'Joe'])
output
┌─arrayZip([1, 2], ['Donald', 'Joe'])─┐
│ [(1,'Donald'),(2,'Joe')]            │
└─────────────────────────────────────┘