How Do the Experts Become Experts?
How do the experts get to that level? A few thoughts today in a guest editorial from Kathi Kellenberger.
2026-06-10
231 reads
How do the experts get to that level? A few thoughts today in a guest editorial from Kathi Kellenberger.
2026-06-10
231 reads
Books used to be the source of knowledge, but times have changed.
2026-05-25
226 reads
If you have been working with SQL Server long enough, you have probably been involved with a SQL Server 2000 to 2005 upgrade. It was painful for many shops due to the deprecation of some features like DTS and the removal of old-fashioned comma joins with the plus operator. It was worth the pain as […]
2019-03-25
1,321 reads
From the time you rise in the morning until you close your eyes at night, your day is filled with thousands of small decisions, many that you don’t even think about. For each decision that you make, there is a probably a good choice and a poor choice available. Most of the time, the good […]
2019-01-28
192 reads
This year, PASS celebrated the 20th PASS Summit. As it has been many times, this year’s Summit was held in Seattle. PASS Summit has visited other locations such as Orlando and Charlotte, but, at least to me, it feels like home when it’s hosted in Seattle. For those of us who have participated for many […]
2018-11-19
71 reads
Have you ever had a difficult time explaining what your job entails to your parents or other family members? You may be working in a field that didn’t exist 20 years ago, such as mobile device development, or your job may be so specialized that non-technical people will never understand. Now that my job title […]
2018-11-05
156 reads
Today Kathi talks about the skills that all of us need to succeed in our careers.
2018-10-30
277 reads
Performance is a common reason to monitor SQL Server. The work day of a database administrator is often interrupted with unexpected calls about slowness in applications or reports. But, how does the performance today compare to the performance last week or last month? Can the root cause of the issue be traced to the database […]
2018-10-08
96 reads
With each recent version of SQL Server, Microsoft has added features that can be used to improve query performance with much less effort than traditional index and query tuning require. First was Query Store, introduced with 2016. When enabled, this feature allows you to easily find regression in query performance due to changing execution plans. […]
2018-05-21
135 reads
Back in my early days as a database administrator, almost 16 years ago, I happened upon a web site called SQL Server Central. Because I found so many useful articles and forum posts, the site was open in my browser at work every single day. It was a great source of information, and eventually, I […]
2018-04-23
169 reads
By Steve Jones
I’ve become an EV guy. I was talking with a friend who was selling...
In a previous post I talked about how we can use T-SQL Snapshot Backups...
By Steve Jones
A bit of a photo dump, but a few fun memories for me from...
Hello, We recently migrated a database from SQL Server 2014 to SQL Server 2022....
Comments posted to this topic are about the item Detecting Outliers in Power BI...
Comments posted to this topic are about the item 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 ) GOThere 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