SQL RNNR

Blog Post

SQL Confessions

I had a brainstorm of an idea for a group of articles on my blog a couple of weeks ago and am finally getting around to putting it together....

2010-12-13

8 reads

Blog Post

Bundle of Joy

After baking for 9 months, our bouncing baby girl has finally arrived.  She arrived Thursday Dec 2, 2010 at 8:28...

2010-12-09

635 reads

Blog Post

Bundle of Joy

After baking for 9 months, our bouncing baby girl has finally arrived.  She arrived Thursday Dec 2, 2010 at 8:28 AM (PST).  There were no complications and the delivery...

2010-12-09

5 reads

Blog Post

Drumroll Please…

Defensive Db Programming Chapter 10 After dragging this review on for months now, it is finally time to bring this bad boy home and wrap it up.  I have...

2010-11-29

13 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