Cloning SQL Servers to a Test Environment
I’ve been involved in a project to set up a full test environment of dozens of SQL Servers. The requirements...
2012-11-08 (first published: 2012-11-05)
4,220 reads
I’ve been involved in a project to set up a full test environment of dozens of SQL Servers. The requirements...
2012-11-08 (first published: 2012-11-05)
4,220 reads
Before I delve into the subject of scripting SSIS package deployments, I’m going to take a slight detour and explain...
2012-11-06
6,643 reads
The website PowershellCommunity.org is moving to a new site poweshell.org and I wasn’t sure the old forum posts will be...
2012-10-26
3,114 reads
During September/October I’ll be presenting at several in-person events:
Tampa IT Pro Camp
Join system administrators and IT professionals for the Tampa...
2012-09-09
1,108 reads
Presentation and scripts from my Storing PowerShell Output session at South Florida IT Pro Camp 2012.
2012-07-22
1,103 reads
Presentation and scripts from my Integrating SQL Server PBM with SCOM session at Jacksonville IT Pro Camp 2012.
2012-06-19
1,162 reads
Join system administrators and IT professionals for the Jacksonville IT Pro Camp on Saturday, June 16th, 2012.
IT Pro Camps are...
2012-06-03
1,225 reads
I saw a question in the forums related to inserting new rows into a SQL Server table only if they...
2012-04-27
5,426 reads
I saw this question in one of forums on backing up i.e. scripting out a database object. The problem is...
2012-04-17
1,801 reads
I wanted show someone how to use table-valued parameters available in SQL Server 2008 and higher. The main use case...
2012-04-13
3,500 reads
By Chris Yates
I’m thrilled to be covering the Microsoft Keynote: Fuel AI Innovation with Azure Databases on Day...
By James Serra
Many customers ask me about the advantages of moving from Azure Synapse Analytics to...
By Brian Kelley
The last data centric conference I attended was the PASS Summit in 2019. A...
Comments posted to this topic are about the item What's New for the Microsoft...
Comments posted to this topic are about the item Using Outer Joins
I have this data in a SQL Server 2019 database:
Customer table CustomerID CustomerName 1 Steve 2 Andy 3 Brian 4 Allen 5 Devin 6 Sally OrderHeader table OrderID CustomerID OrderDate 1 1 2024-02-01 2 1 2024-03-01 3 3 2024-04-01 4 4 2024-05-01 6 4 2024-05-01 7 3 2024-06-07 8 2 2024-04-07I want a list of all customers and their order counts for a period of time, including zero orders. If I run this query, how many rows are returned?
SELECT c.CustomerName, COUNT(oh.OrderID) FROM dbo.Customer AS c LEFT JOIN dbo.OrderHeader AS oh ON oh.CustomerID = c.CustomerID WHERE oh.Orderdate > '2024/04/01' GROUP BY c.CustomerNameSee possible answers