Cloud Provider Outage!
Your Cloud Provider is experiencing an outage! Your websites and databases are all down! When local data centers were the primary source...
2025-06-12
40 reads
Your Cloud Provider is experiencing an outage! Your websites and databases are all down! When local data centers were the primary source...
2025-06-12
40 reads
How U.S.-India Tariff Disputes Could Ripple Through the Indian IT Sector Although the newly imposed U.S. tariffs—such as the 26% duty on select Indian exports—don’t directly target India’s IT...
2025-06-12
47 reads
🌟 Why Microsoft Azure Certifications Are Beneficial for Your Career 🗓️ How to Schedule and Appear for Azure Certification Exams Microsoft Azure Certification Corporate Discounts: How to Save Up...
2025-06-12
75 reads
I had someone ask me about using triggers to detect changes in their tables. This is a second post looking at triggers, in this case, modifying my trigger to...
2025-06-11
102 reads
Useful tips to make your jobs more stable Too many IT teams treat SQL Server Agent jobs like a coffee timer “Set it and forget it!” Unfortunately, that mindset...
2025-07-02 (first published: 2025-06-11)
582 reads
After spending decades working in SQL Server, getting familiar with PostgreSQL felt like traveling to a country where everyone speaks a language I mostly understand – but with a different accent...
2025-06-25 (first published: 2025-06-11)
866 reads
What is Concurrency in Databases? Concurrency control ensures that multiple transactions can occur simultaneously without leading to data inconsistency. Two popular concurrency control mechanisms are: MVCC in PostgreSQL PostgreSQL...
2025-06-25 (first published: 2025-06-11)
416 reads
I’m presenting a free webinar at MSSQLTips.com at Thursday, July 10, 2025 at 6PM UTC (8PM CET or 2PM EDT). The abstract: As you might learn from the abstract,...
2025-06-11
88 reads
This month we have a great invite from Joe Fleming, a first time host of T-SQL Tuesday. Joe reached out when I requested some hosts and I’m glad he...
2025-06-10
113 reads
Joe Fleming wants to know how I solve weird problems. I’m not sure I’m actually qualified to answer this question since I, myself, am a weird problem, but I’ll...
2025-06-30 (first published: 2025-06-10)
374 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