DuckDB provides us with an easy way to add one or more time intervals to date values. This includes adding one or more years to a date.
Here are two options for adding one or more years to a date in DuckDB.
Continue readingDuckDB provides us with an easy way to add one or more time intervals to date values. This includes adding one or more years to a date.
Here are two options for adding one or more years to a date in DuckDB.
Continue readingIf you’re getting an error that reads “Not implemented Error: Unknown TimeZone” in DuckDB, it appears that you’re using an unknown timezone when specifying a timezone for a timestamp value.
To fix this issue, be sure to use a supported timezone.
Continue readingSometimes we need to specify a time zone when constructing timestamp values in DuckDB. But we may not always know the exact value to use for the time zone.
Fortunately, we can use the pg_timezone_names()
table function to get a list of available timezones in DuckDB.
The following table outlines the inbuilt mathematical functions available in SQLite.
Continue readingDuckDB is an in-process SQL OLAP database management system designed for analytical workloads. Among its many functions is one called last()
. This function returns the last value in a column.
Let’s take a look at the last()
function in DuckDB.
Both AGE()
and DATE_DIFF()
are DuckDB functions used to calculate time differences, but they serve distinct purposes and exhibit different behaviors that are important to understand when working with temporal data.
This article explores the difference between these two functions.
Continue readingIn DuckDB, the make_date()
function enables us to create date values from individual year, month, and day components. This function is particularly useful when working with data that stores date components separately or when constructing date values programmatically.
Working with dates often requires extracting specific components, such as the week number, for analysis or reporting. In DuckDB, there are multiple functions to retrieve the week from a date, each catering to different needs. This article explores four such functions, including how to calculate the ISO week—a standard defined by ISO-8601 where weeks start on Monday and the first week of the year contains the year’s first Thursday.
Continue readingDuckDB has a max_by()
function that finds the row with the maximum value in one column and returns the corresponding value from another column at that row.
Below are some examples that demonstrate how it works.
Continue readingOne of the aggregate functions available in DuckDB is the FIRST()
function, which returns the first value from each group in a query.
Let’s take a look at some examples of using the FIRST()
function in DuckDB