DuckDB has a list_select() function and a list_slice() function, and both do a similar thing. They allow us to extract values from lists based on their index in the list. But they’re quite different in the way they work. One function allows us to select elements based on a range, while the other function allows us to handpick each element we want returned.
Round vs Format in SQL Server: Which to Use for Decimal Precision?
When working with numbers in SQL Server, both ROUND() and FORMAT() can be used to round the numeric values to a given decimal precision. But that doesn’t mean we should use them interchangeably. Each function serves a different purpose and has its distinct use cases.
How to Find Users Connected to SQL Server (T-SQL)
Checking which users are connected to a SQL Server can be useful for both performance and security. It helps database admins see who’s using the system, what applications they’re running, and from where. This makes it easier to troubleshoot issues like slow queries or high resource usage. It also helps spot unusual or unauthorized access, such as logins from unknown machines or at odd times. Regularly reviewing active connections is a simple way to keep the server running smoothly and securely.
Below are five queries we can use to check which users are connected to a SQL Server instance.
How to Run SQL Server on your Mac with Azure SQL (for Free)
If you’re a Mac developer, setting up SQL Server locally is probably starting to feel like more trouble than it’s worth. Between workarounds like Docker, virtual machines, and third-party tools, just getting a working SQL Server environment on macOS is not exactly your run-of-the-mill installation.
Add to that Microsoft’s announcement to retire SQL Edge in September 2025 (SQL Edge was our only hope of installing SQL Server on a Mac without using a virtual machine), not to mention the impending retirement of Azure Data Studio in Feb 2026 (which we could use to connect to SQL Server), and you may start to wonder whether you should drop the whole idea of using SQL Server altogether.
5 Functions that Extract the Month from a Date in DuckDB
Sometimes when working with SQL databases like DuckDB, we need to return the month part from a date for presentation or for further processing. DuckDB provides us with a handful of functions that can help in this regard.
In this article, we’ll look at five different functions we can use to extract the month from a date in DuckDB.
Connect to Azure SQL Database Using VS Code
Visual Studio Code (VS Code) is an excellent tool for connecting to Azure SQL Database and managing data right from within your development environment. With a few simple steps, you can run queries, explore tables, and integrate database tasks into your development workflow.
This article walks you through connecting to Azure SQL using VS Code.
Install SQL Server Command Line Tools on a Mac
mssql-tools is a command-line utility developed by Microsoft that provides tools for interacting with Microsoft SQL Server environments. It includes sqlcmd for executing Transact-SQL (T-SQL) queries and scripts, and bcp (Bulk Copy Program) for importing and exporting large volumes of data. These tools can be useful when you want to manage SQL Server directly from the terminal without relying on graphical interfaces.
One cool thing about mssql-tools is that it’s cross-platform. It can be installed on macOS, Linux, and Windows machines. This makes it ideal for modern development environments, especially when working with cloud-based solutions like Azure SQL Database.
In this article, we’ll look at how to install mssql-tools on a Mac and use it to connect securely to an Azure SQL Database.
Create a Resource Group in the Azure Portal
An Azure resource group is a container that logically organizes related Azure resources, allowing for easier management, deployment, and access control of those resources. When we do things like create a SQL database, we need to create a resource group for the database to belong to. We can create the resource group while creating the database, but we can also create the resource group separately.
This article shows the steps for creating a resource group separately, from the Azure portal home page.
Extracting the First Non-NULL Value from a List with DuckDB’s LIST_ANY_VALUE() Function
DuckDB provides us with a good selection of list functions. This includes a list_any_value() function, which returns the first non-NULL value from a given list.
4 Ways to Get the Last Value from a List in DuckDB
When it comes to working with lists, DuckDB often provides us with multiple methods of performing a given task. Getting the last value from a list is no exception.
Here are four options we can use to extract the last value from a list in DuckDB.