Top 5 Advanced SQL Courses for 2025 (Must-Know)
Want to seriously boost your data skills? Mastering advanced SQL is the key, whether you're in data analysis, data science, or any field that uses data. Trust me, it's...
2024-12-17
92 reads
Want to seriously boost your data skills? Mastering advanced SQL is the key, whether you're in data analysis, data science, or any field that uses data. Trust me, it's...
2024-12-17
92 reads
Want to learn SQL and get some real practice this December? Check out the Basic SQL Practice: A Store course – it's totally free for the entire month! This...
2024-12-14
57 reads
Want to seriously boost your data skills? Mastering advanced SQL is the key, whether you're in data analysis, data science, or any field that uses data. Trust me, it's...
2024-12-10
292 reads
This Black Week, don't just get a discount—get ahead! Whether you're a total newbie or already know some SQL, this sale has awesome learning options at prices you won't...
2024-11-26 (first published: 2024-11-25)
33 reads
This Black Week, don't just get a discount—get ahead! Whether you're a total newbie or already know some SQL, this sale has awesome learning options at prices you won't...
2024-11-22
66 reads
This article provides a comprehensive overview of the ORDER BY clause within SQL window functions. We'll explore how it interacts with PARTITION BY and the standard ORDER BY clause,...
2024-11-11 (first published: 2024-10-24)
690 reads
Want to build a data analytics foundation that transforms raw data into valuable business insights? Look no further than SQL! It's the perfect tool for creating powerful data pipelines...
2024-11-04 (first published: 2024-10-21)
763 reads
I'm excited to tell you about the "SQL from A to Z" learning track. This comprehensive program will take you from SQL newbie to pro in no time. It's...
2024-10-28
59 reads
SQL is essential for modern businesses and applications that rely on data. It's a robust language that lets you work with databases, pull out the information you need, and...
2024-10-16
178 reads
Look, we all know data is king these days. But having mountains of data and actually using it to make your business better are two different things. That's where...
2024-10-10
45 reads
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...
By Steve Jones
I was excited to try out the latest release of SSMS, v22.12.1 for this...
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