SQL RNNR

Blog Post

SQL 2012 has Launched

LAUNCH If you have been hiding under a rock, you have probably not heard that SQL 2012 has launched.  With it, some really cool features are now available to...

2012-04-01

6 reads

Blog Post

Seldom Used Indexes

On occasion you may ask yourself if there are any under used indexes in your database.  If not you, then...

2012-03-26 (first published: )

2,435 reads

Blog Post

Seldom Used Indexes

On occasion you may ask yourself if there are any under used indexes in your database.  If not you, then possibly a manager or client.  Usually this comes up...

2012-03-20

4 reads

Blog Post

Another Interesting Sort

Some code requirements can be met through various means including the use of a different collation - which means a lot of testing.
Related Posts:

Creative Database Naming January 2, 2020...

2012-03-19

7 reads

Blog Post

Agent Jobs Using SSIS

This is a short script to help the DBA with documentation purposes.  This would come in handy especially in those cases where you are consulting or you have taken...

2012-03-15

10 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