What is KTLO? Keep The Lights On vs Project Work in Agile
🔍 Demystifying KTLO: A Deep Dive into Keep The Lights On Work in IT and Agile In the realm of IT operations and software development, not all tasks are...
2025-07-10
62 reads
🔍 Demystifying KTLO: A Deep Dive into Keep The Lights On Work in IT and Agile In the realm of IT operations and software development, not all tasks are...
2025-07-10
62 reads
The PASS Summit goes on tour this year, with a September stop in Dallas. This is the first event in the series, and I’m excited to go back to...
2025-07-09
81 reads
Settings That Could Be Hurting Your Performance If you’ve ever created a new SQL Server database and just left the default settings alone, you’re not alone. Microsoft provides a...
2025-07-09
136 reads
I needed to run a PowerShell cmdlet in an Azure Devops pipeline. The cmdlet in question was New-AzRoleAssignment, but the cmdlet itself isn’t important. What is important is that...
2025-07-09
108 reads
T-SQL Tuesday is a monthly blog party hosted by a different community member each month. This month, John Sterrett
(blog) asks us:
What are you doing, or what can we do...
2025-07-08
29 reads
In my YouTube subscriptions feed, a new video for the Azure Cloud Chronicles with Microsoft MVPs channel popped up and when I went to it, I noticed that the...
2025-07-08
50 reads
This month we have a great T-SQL Tuesday, hosted by John Sterrett. He has been a great help in multiple communities over the years, and he has quite an...
2025-07-08
125 reads
PostgreSQL, often referred to as Postgres, is a powerful, open-source object-relational database system that has evolved over decades. It is known for its reliability, feature richness, and strong community...
2025-07-08
105 reads
Logging is a necessity in the database world, well, the entire tech world. You need to know what is happening in and around your databases. It’s easy to setup...
2025-07-07
313 reads
☁️ Cloud vs. On-Premises Database Security: A Strategic Transformation The approach to securing databases has evolved significantly with the rise of cloud computing. In a traditional on-premises setup, organizations...
2025-07-07
27 reads
By ReviewMyDB
Part 3 of my What's New in SQL Server for the Developer series. SQL...
By Brian Kelley
I once kept a gratitude journal and I still have a task on my...
By Arun Sirpal
The goal is simple: register AgentDBA as an MCP server in Claude Code, so...
Hi everyone, We previously used the Microsoft Access Database Engine 2016 (ACE) provider. As...
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...
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