array_filter()

Constructs a list from those elements of the input list for which the lambda function returns true. DuckDB must be able to cast the lambda function's return type to BOOL. The return type of list_filter is the same as the input list's.

Alias of list_filter()

Arguments & returns

array_filter(list, lambda(x))

Scalar
Overload link listlambda(x) Returns
#01 ANY[]LAMBDA ANY[]

Example

array_filter example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.