How ARG_MAX_NULL() Works in DuckDB

In DuckDB, the arg_max_null() function works in a similar way to the arg_max() function, in that it finds the row with the maximum value in one column and returns the corresponding value from another column at that row.

But where it differs from arg_max() is in the way it deals with NULL values. Also, arg_max_null() only accepts two arguments, whereas arg_max() accepts an optional third argument. Additionally, there aren’t any aliases for arg_max_null() at the time of writing (arg_max() has a couple of aliases).

In this article we’ll look at how arg_max_null() works, and we’ll compare it with arg_max() to see how each function handles NULL values.

Continue reading

A Quick Look at the LIST() Function in DuckDB

DuckDB, an in-memory analytical SQL database management system, provides a good selection of functions for data manipulation and analysis. One of the these functions is list().

The list() function enables users to group multiple values into a single list, allowing for more advanced data aggregation and operations.

In this article, we’ll explore how the list() function works, along with some simple examples.

Continue reading