In SQL Server, Common Table Expressions (CTEs) are often used for readability and simplifying complex queries. While CTEs are most commonly used when running a SELECT
query, we can also use CTEs to perform updates with the UPDATE
statement. This can be useful when we need to reference the same set of data multiple times or want to update records conditionally.
Category: DBMS
Database Management Systems
Exploring ARRAY_AGG() in DuckDB
array_agg()
is an aggregate function in DuckDB that allows you to combine values from multiple rows into a list. This article explores how array_agg()
works, along with some examples that demonstrate its usage.
Simple BIT_XOR() Examples in DuckDB
In DuckDB, the bit_xor()
function returns the bitwise XOR
 of all bits in a given expression.
Here are some basic examples that demonstrate how the bit_xor()
function works in DuckDB.
How to Output Query Results as LaTeX Tables in the DuckDB CLI
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 readingBOOL_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.
Understanding the TAN() Function in SQLite
The TAN()
function in SQLite calculates the tangent of an angle provided in radians. The tangent is the ratio of sine to cosine (or the ratio of the opposite side to the adjacent side in a right triangle).