Concatenating Strings in DuckDB

String concatenation is a common operation when running database queries. It simply involves joining two strings together, end to end. DuckDB provides multiple methods for combining strings, each with its own use cases and advantages.

This article explores the various ways to concatenate strings in DuckDB.

Read more

Fix “No function matches the given name and argument types ‘bool_and(INTEGER)'” in DuckDB

If you’re getting an error that reads something like “No function matches the given name and argument types ‘bool_and(INTEGER)’” in DuckDB, it’s probably because you’re passing a non-boolean value to the bool_and() function.

The bool_and() function is for use against boolean expressions, so to fix this issue, be sure that the argument you pass to the function is a boolean expression.

Read more

How to Create an In-Memory Database in DuckDB

DuckDB is a high-performance, in-process SQL database management system that supports various modes of operation, including the ability to create an in-memory database. An in-memory database stores all data in RAM, ensuring fast access and excellent performance.

This article explores how to create an in-memory database in DuckDB.

Read more

An Overview of ARG_MIN() in DuckDB

In DuckDB, arg_min() is an aggregate function that finds the row with the minimum value in one column and returns the corresponding value from another column at that row. Rows where either of the first two expressions is NULL are ignored.

In this article we explore DuckDB’s arg_min() function with some simple examples.

Read more

Enable Vertical Query Output in DuckDB

When using DuckDB’s command line interface (CLI), we can use the .mode command to change how query results are formatted. For example, we can output query results as a table, in CSV format, or even JSON. Another option is to output it in “line” mode, which outputs the query results vertically, as opposed to horizontally across the screen.

This article demonstrates how to enable vertical query output in the DuckDB CLI with line mode.

Read more

How CONCAT_WS() Works in DuckDB

In DuckDB, the CONCAT_WS() function provides an efficient way to join strings with a specified separator. CONCAT_WS() stands for “concatenate with separator”, and many RDBMSs have such a function.

CONCAT_WS() is particularly useful when you need to combine multiple fields or values with a consistent delimiter.

Let’s explore its features and practical applications.

Read more