SQL Swimmer

Blog Post

Will You Vote?

Voting is one of the many privileges that I have as an American citizen.  It’s a privilege that most Americans...

2013-09-23

580 reads

Blog Post

Saving Grace

According to Merriam-Webster the definition of grace is:
1a : unmerited divine assistance given humans for their regeneration or sanctification; b : a...

2013-05-30

1,256 reads

Blog Post

Certifiable?

I have recently begun to contemplate pursuing the MCSA Certification.  I have been working with SQL Server for almost 20...

2013-05-17

634 reads

Blog Post

Mentoring

I’m putting my money where my mouth is, with respect to my last blog post.  I am officially a mentor...

2012-08-24

654 reads

Blog Post

Paying it Forward

My company has recently put forth an effort to hire fresh college graduates and interns.  I think this is a...

2012-08-24 (first published: )

1,750 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