The Difference Between LIST_SELECT() and LIST_SLICE() in DuckDB

DuckDB has a list_select() function and a list_slice() function, and both do a similar thing. They allow us to extract values from lists based on their index in the list. But they’re quite different in the way they work. One function allows us to select elements based on a range, while the other function allows us to handpick each element we want returned.

Read more

Quick Overview of the List Operators in DuckDB

DuckDB provides us with a bunch of functions and operators that we can use when working with lists. These include operators for doing things like concatenating lists to performing calculations on the lists. Most of these operators are aliases for a corresponding function, so we can choose which one to use in those cases.

This article provides an overview of the six list operators available in DuckDB, along with basic examples to demonstrate their usage.

Read more

5 Ways to Convert a List to a String in DuckDB

If we have a list in DuckDB, and we want to convert it to a string, there are a number of options on the table. Basically, what we want to do is combine/concatenate all elements into a single string. Let’s take a look at five ways to convert a list to a string in DuckDB.

Read more