DuckDB is a fast and reliable analytical database that offers a bunch of aggregate functions. One such function is ANY_VALUE()
.
In this post, we’ll explore the ANY_VALUE()
function, along with examples to demonstrate its usage.
Database Management Systems
DuckDB is a fast and reliable analytical database that offers a bunch of aggregate functions. One such function is ANY_VALUE()
.
In this post, we’ll explore the ANY_VALUE()
function, along with examples to demonstrate its usage.
The FLOOR()
function in SQLite returns the largest integer value that is less than or equal to a given numeric expression. Essentially, it “rounds down” a decimal number to the nearest integer below it.
This function is useful in cases where you want to discard the decimal portion of a number without rounding up.
Continue readingIf you’re getting an error that reads “mode should be one of: ascii box column …etc” in DuckDB, it appears that you’re trying to set the output mode to an invalid value.
While we can change the output mode in DuckDB, it must be one of the supported modes.
To fix this issue, be sure to use a supported mode.
Continue readingDuckDB’s CLI provides a convenient way to generate INSERT
statements from query results. This can be particularly useful for data migration, creating test data, or backing up specific data subsets. Here’s how to do it.
SQLite is a widely-used lightweight database engine that powers many mobile, embedded, and desktop applications. One of its key features is its dynamic type system, which allows flexibility in handling data. While this is advantageous in many scenarios, there are cases where developers need precise control over how data is treated or converted between types. This is where SQLite’s CAST()
expression comes in.
NULL values in databases can be tricky to handle and often lead to unexpected results. DuckDB’s COALESCE()
function provides an easy way to manage NULL values effectively.
In this article, we’ll explore the COALESCE()
function in DuckDB with some practical examples.
If you’ve ever run .help mode
in the DuckDB command line interface (CLI), you may have noticed that it returns information about the .mode
command, including its syntax.
You might’ve noticed that there’s a ?TABLE?
part in the syntax. What’s this about? Maybe you’ve tried it out and found that it didn’t appear to do anything?
In this article, I’ll explain what the ?TABLE?
part is for, and I’ll run an example to demonstrate.
DuckDB is a lightweight, fast database management system designed for analytics and embedded use cases. Its versatility makes it an excellent choice for developers and data analysts.
One useful feature of DuckDB is the ability to output query results in different formats, such as JSON, directly from the command-line interface (CLI). By default, the DuckDB CLI uses the duckbox
output mode for query results (which outputs the results in a table-like format), but we can change that.
In this article, we’ll walk through the steps to output query results as JSON when using the DuckDB CLI.
Continue readingDuckDB is a fast, efficient, and embeddable SQL database designed for analytical workloads. As with any other RDBMS, a common task is listing all the tables in your DuckDB instance.
This article covers five options for displaying a list of tables in DuckDB.
Continue readingDuckDB’s command line interface (CLI) provides a convenient .mode csv
command that allows you to output all query results directly in CSV format. This approach differs from the COPY
statement as it affects the output format of all subsequent queries until changed.
The article takes a quick look at CSV mode in the DuckDB CLI.
Continue reading