This article demonstrates how to output your DuckDB query results in LaTeX table format, which can be useful when preparing academic papers, technical documents, or any content that needs to be typeset using LaTeX.
Continue readingCategory: DuckDB
BOOL_OR() Examples in DuckDB
In DuckDB, the bool_or()
aggregate function returns true
if any input value is true
, otherwise it returns false
.
Here are some basic examples that demonstrate how it works.
Continue readingA Quick Look at DuckDB’s BIT_OR() Function
In DuckDB, the bit_or()
function returns the bitwise OR
of all bits in a given expression.
Let’s see how the bit_or()
function works in DuckDB with some basic examples.
How to Output Query Results in NDJSON Format in the DuckDB CLI
DuckDB’s CLI allows you to output query results in different formats, including NDJSON (Newline Delimited JSON).
NDJSON is similar to JSON, except that with NDJSON, each line contains its own self-contained JSON document.
This article shows you how to check your current output mode, and then change it to NDJSON.
Continue readingConcatenating 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.
Continue readingExploring the BIT_AND() Function in DuckDB
In DuckDB, the bit_and()
function returns the bitwise AND
of all bits in a given expression.
Let’s take a quick look at the bit_and()
function, along with some simple examples.
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.
Using DuckDB’s FAVG() Function for More Accurate Floating Point Averages
The favg()
function in DuckDB calculates averages using a floating point summation method known as Kahan summation (or compensated summation). This method helps reduce the accumulation of rounding errors that can occur when many floating point numbers are involved when using the regular avg()
function.
A Quick Look at the AVG() Function in DuckDB
In DuckDB, avg()
is an aggregate function that returns the average of all non-NULL values in its argument (usually a column).
In this article we’ll take a quick look at this function, along with some basic examples.
Continue readingHow 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.
Continue reading