3 Ways to Get the Minimum Value from a List in DuckDB

Most SQL developers are familiar with the min() function that allows us to get the minimum value from a data set. But if we want to get the minimum value from a list, passing the list to the min() function won’t quite cut it. But don’t despair! Finding the minimum value in a list is just as easy. Here are three ways to do it. And yes, we can even use the min() function if we want.

Continue reading

4 Ways to Concatenate 3 or More Lists in DuckDB

If you’ve ever used list_concat() or any of its aliases to concatenate lists in DuckDB, you may have been disappointed to find out that it only concatenates two lists. Any more than two lists and it returns an error. At least that’s how it works at the time of this writing.

Fortunately, there are some alternatives we can use in order to concatenate three or more lists.

Here are four ways to concatenate three or more lists in DuckDB.

Continue reading