Grant Fritchey

Grant Fritchey is a SQL Server MVP with over 20 years’ experience in IT including time spent in support and development. Grant has worked with SQL Server since version 6.0 back in 1995. He has developed in VB, VB.Net, C# and Java. Grant has authored books for Apress and Simple-Talk, and joined Red Gate as a Product Advocate in January 2011. Find Grant on Twitter @GFritchey or on his blog as the Scary DBA.

SQLServerCentral Editorial

People Matter

I'm writing this sitting in a hotel room. PASS Data Community Summit has just finished (and we're going to do it again next year, twice). Before writing editorials, unless I've got a burning idea, I like to glance back through the editorials I've written to be sure I'm not repeating myself too much. Funny enough, […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2026-11-14

115 reads

SQL Server 2022 Query Performance Tuning

Troubleshoot slow-performing queries and make them run faster. Database administrators and SQL developers are constantly under pressure to provide more speed. This new edition has been redesigned and rewritten from scratch based on the last 15 years of learning, knowledge, and experience accumulated by the author. The book Includes expanded information on using extended events, automatic execution plan correction, and other advanced features now available in SQL Server.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2026-11-02 (first published: )

5,446 reads

SQLServerCentral Editorial

I Struggle

This one is going to involve a lot of honesty & self-reflection. Run now. You've been warned. I know for a fact that I'm blessed. I'm healthy. I have a loving family. There are friends out there happy to see me when we meet. I've got one of the single greatest jobs ever. I live […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2026-10-16

125 reads

SQLServerCentral Editorial

The DBA is Dead! Long Live the !

I'm sure I've never mentioned this before, but I'm a little aged. I'm not real far from 40 years in IT, and I got started a little late in life. Regardless, I've heard this tale of woe before. And no, this isn't going to be a rehash of all the old stories ("self-tuning" SQL Server […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2026-10-14

247 reads

SQLServerCentral Editorial

It's Never Just One Thing

I was reading about a recent security failure when I saw the phrase "...a series of missed opportunities...". Made me giggle and say to myself "No Kidding Kojak" except I used Sherlock Holmes and a different word. Fact is, security failures, and hey, let's face it, process failures, almost never come down to a single […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2026-10-12

110 reads

SQLServerCentral Editorial

Let's Talk Certifications

In just over a week, I'm going to be in Valencia, Spain, for pgConf.eu. While there, I'm planning to take the first certification to come out of the Open Alliance for PostgreSQL Education. I'm more than a little nervous because I'm not sure I'm ready. However, I've been studying and reading, watching videos, practicing my […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2026-10-10

125 reads

SQLServerCentral Editorial

Looking for New Blood

You may not be old, but I sure am. As I travel around to all the different conferences to speak, whether we're talking a dev conference, SQL Server, or PostgreSQL, one of the topics that keeps coming up is age. The age of the organizers. It's mostly the same people putting on events for the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2026-09-05

322 reads

SQLServerCentral Editorial

Learn From History

I've just spent a week in the UK visiting the Redgate HQ with my fellow advocates. I'm really blessed to get to work with such a great bunch of people. A couple of the conversations we had stuck with me and I'd like to share them here. Sitting in the midst of Cambridge, Cambridgeshire, UK, […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2026-08-15

283 reads

Blogs

November 2026 Car Update: MPG Comparisons

By

I’ve become an EV guy. I was talking with a friend who was selling...

T-SQL Snapshot Backups on Availability Group Secondary Replicas Continued

By

In a previous post I talked about how we can use T-SQL Snapshot Backups...

Memories of PASS Data Community Summit 2026

By

A bit of a photo dump, but a few fun memories for me from...

Read the latest Blogs

Forums

Detecting Outliers in Power BI using Z-Score

By Dinesh Asanka

Comments posted to this topic are about the item Detecting Outliers in Power BI...

Missing Returns

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Missing Returns

Nobody Forgot Math With Calculators

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Nobody Forgot Math With Calculators

Visit the forum

Question of the Day

Missing Returns

I have a few tables in my SQL 2025 database:

CREATE TABLE [dbo].[Customer]
(
[CustomerID] [int] NOT NULL,
[CustomerName] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AddressKey] [int] NULL,
[CustomerStatus] [int] NULL,
[CustomerContact] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ContactEmail] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PreferredName] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Customer] ADD CONSTRAINT [CustomerPK] PRIMARY KEY CLUSTERED ([CustomerID]) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Orders]
(
[OrderID] [int] NOT NULL,
[CustomerID] [int] NOT NULL,
[ProductID] [int] NOT NULL,
[OrderDate] [date] NOT NULL,
[Quantity] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [PK__Orders__C3905BAFE0146D59] PRIMARY KEY CLUSTERED ([OrderID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [FK_Orders_Customers] FOREIGN KEY ([CustomerID]) REFERENCES [dbo].[Customers] ([CustomerID])
GO
ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [FK_Orders_Products] FOREIGN KEY ([ProductID]) REFERENCES [dbo].[Products] ([ProductID])
GO
CREATE TABLE dbo.CustomerReturn
( EntryID INT NOT NULL CONSTRAINT CustomerReturnPK PRIMARY KEY
, CustomerID INT
, ReturnDate DATETIME
, OrderID INT NOT NULL
)
GO
There are multiple rows in all these tables. I am trying to find how many customers have never returned anything, and I run this:
SELECT count(*)
FROM dbo.Customer
WHERE CustomerID NOT IN
      (
          SELECT CustomerID FROM dbo.CustomerReturn
      );
I get zero rows, but I know there are customers who have not returned anything. What is wrong?

See possible answers