The Scary DBA

Blog Post

Tracking CPU Use Over Time

A question that I’ve seen come up frequently just recently is, how to track CPU use over time. Further, like a disk filling up, people want to know how...

2019-12-16 (first published: )

669 reads

Blog Post

Your First Jupyter Notebook

In April, I said I was going to start learning Jupyter Notebooks. It’s November. Let’s get going with your first Jupyter Notebook. A quick aside before we start. I...

2019-11-28 (first published: )

727 reads

Blog Post

Docker, Git and DBATools

For those who don’t know, last week was the PASS Summit. It’s an amazing event every year, but this last week, I saw a ton of indications that our...

2019-11-20 (first published: )

635 reads

Blog Post

You Are A Coder

So, you say you’re a DBA. I say you’re not. You say you’re a system administrator. I say you’re wrong. We are all coders now. Every single one of...

2019-11-04

49 reads

Blog Post

Well Trained Staff

I’ve had the opportunity in the last month to do a couple of different consulting visits, one private and one through my employer, Redgate. The goals of each of...

2019-10-28

22 reads

Blogs

How to Clear the SSMS Cache (SSMS 21 and Later)

By

How to Clear the SSMS Cache (SSMS 21 and Later) Updated...

The flight recorder: Replaying what an AI agent did on my SQL Server

By

“What exactly did it do on my server?” is the first question a DBA...

Announcements from the Microsoft Fabric Community Conference — Barcelona 2026

By

Microsoft shared a broad set of Fabric, Power BI, and SQL updates at FabCon...

Read the latest Blogs

Forums

Let's Talk Certifications

By Grant Fritchey

Comments posted to this topic are about the item Let's Talk Certifications

The Hidden Security Risks of Role Combination in SSAS Tabular

By Pablo Echeverria

Comments posted to this topic are about the item The Hidden Security Risks of...

The Empty Aggregate

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Empty Aggregate

Visit the forum

Question of the Day

The Empty Aggregate

I have this table in a SQL Server 2025 database:

CREATE TABLE [dbo].[CustomerOrder]
(
[OrderID] [int] NULL,
[CustomerID] [int] NULL,
[total] [money] NULL
) ON [PRIMARY]
GO
What is returned from this code? (answers are for the sum and then the count)
SELECT SUM(total) AS sum,
       COUNT(total) AS count
FROM dbo.CustomerOrder;



See possible answers