Calculate a Moving Average with T-SQL Windowing Functions
Learn how to create a moving average in SQL Server using older and less performant T-SQL and a modern way using windowing functions.
Learn how to create a moving average in SQL Server using older and less performant T-SQL and a modern way using windowing functions.
Building software can be hard and lots of people have tried various methodologies to improve the way their teams work. Steve notes a lot of the process is the same, but he has a preference.
In this first level of the SSAS Tabular stairway, learn how to implement and format a date dimension.
Like ancient Gaul, SQL is divided into three sub- languages. The DDL (Data Declaration Language) declares the data. This is where we find the data types, constraints, references and other structures that have to do with how the data stored . The DML (Data Manipulation Language) uses those declarations to change their contents or to invoke them. It does not change structures and schema objects.
As a Data Engineer I found myself having to learn rather more about cloud infrastructure than I had expected.
I've been very pleased with the direction of SSMS the last few years. As it's been separated from SQL Server releases and gets updated more often, I think the changes from v17 though v20 have been improvements. There are still issues, but it's been better. Now we finally have SSMS moving to a modern shell […]
This article looks at how to use SQL IS NULL and SQL IS NOT NULL operations in SQL Server along with use cases and working with NULL values.
We have all heard the saying I based this week's editorial on. It has been credited to Benjamin Franklin and goes like this, “You can do anything you set your mind to”. This is such a powerful way of thinking when you are starting a task. “I can do it, no matter what anyone says.” […]
If you've ever wondered if you can do better than an INDEX SCAN when you do a LIKE "%string%" search, read on...
Steve Jones thinks that we often over-engineer software, trying too hard to consider every possibility rather than getting it close.
By Vinay Thakur
Continuing from Day 3 where we covered LLM models open/closed and their parameters, Today...
By Steve Jones
One of the nice things about Flyway Desktop is that it helps you manage...
By HeyMo0sh
Microsoft Fabric (not to be confused with the more general term “fabric” in DevOps)...
I'm fairly certain I know the answer to this from digging into it yesterday,...
Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production...
hi everyone I am not sure how to write the query that will produce...
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers