Lists & arrays
Scalar
list_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.
Arguments & returns
list_filter(list, lambda(x))
Scalar
| Overload link | list | lambda(x) |
Returns |
|---|---|---|---|
| #01 | ANY[] | LAMBDA |
ANY[] |
Example
Haybarn WASM 1.5.5-rc3 · In your browser
Engine example · Run to view results.
In other engines
Snowflakearray_remove()
ARRAY_REMOVE([1, 2, 3], 2)
LIST_FILTER([1, 2, 3], _u -> _u <> 2)