DuckDB has a list_sort()
function that does exactly what its name promises; sorts lists.
While the easiest way to use this function is to simply pass a list, we can also pass other arguments to fine-tune the results.
Continue readingDuckDB has a list_sort()
function that does exactly what its name promises; sorts lists.
While the easiest way to use this function is to simply pass a list, we can also pass other arguments to fine-tune the results.
Continue readingDuckDB’s command-line interface (CLI) provides a way to suppress query results using the .mode trash
command. This feature is particularly useful in scenarios where you need to execute queries but don’t want their results to be displayed.
Time-based operations are a fundamental aspect of data analysis and manipulation. DuckDB, the in-process analytical database management system, provides robust support for handling time-based operations through its INTERVAL
data type.
This article explores the capabilities, syntax, and practical applications of intervals in DuckDB.
Continue readingSQLite provides several ways to determine how many rows are affected by SQL statements such as INSERT
, UPDATE
or DELETE
.
One way of achieving this is with the changes()
function. This function returns the number of rows modified by the most recent SQL statement executed in the current session.
Another way is with the .changes
dot command.
In this article, we’ll look at an example that uses these options to get the number of rows changed by various SQL statements.
Continue readingDuckDB provides us with a good selection of functions for working with date/time values. Among them is date_part()
, which we can use to extract specific components from dates, timestamps, and intervals.
In this article, we’ll look how the date_part()
function works, along with some basic examples.
If you’re getting an “Out of Range Error” when using the generate_subscripts()
function in DuckDB, it could be that you’re specifying a non-existent dimension for the array.
DuckDB’s generate_subscripts()
function accepts the array as the first argument, and the dimension as the second argument. The second argument must correspond to an actual dimension present in the array.
To fix this issue, be sure to specify a dimension that actually exists in the array.
Continue readingDuckDB has a string_agg()
function, which allows us to concatenate strings from a group of rows into a single string. This function can be useful when we need to aggregate text data in a meaningful way.
In this article, we’ll explore how the string_agg()
function works, along with some simple examples to demonstrate its usage.
DuckDB has a function called list_distinct()
that enables us to remove duplicate values from a list. Any value that appears more than once is “deduped” and is returned once in the resulting list.
The function also removes any NULL values.
Continue readingDuckDB has enhanced its user experience with the introduction of a new web-based user interface in the v1.2.1 release. This addition brings graphical interaction capabilities to the analytical database system, making it more accessible to users who prefer visual interfaces over command-line operations.
Continue readingThe DuckDB command line interface (CLI) provides us with the ability to output query results in various formats. One of these formatting options is HTML.
This article shows you how to output your DuckDB query results as HTML tables, which can be useful when you need to include the results in web pages or documentation.
Continue reading