Let’s Meetup [Updated]!
I have a confession to make. I like to meet people who also work with SQL Server. There are so...
2012-04-17
673 reads
I have a confession to make. I like to meet people who also work with SQL Server. There are so...
2012-04-17
673 reads
TweetG’day,
Recently I was updating some of my Powershell scripts for managing SQL SERVER instances.
Generally, when writing a Powershell script to...
2012-04-17
5,716 reads
Merge Command:- Merge command is a new feature introduced in the SQL Server 2008. It can perform Update, Insert and...
2012-04-17
1,730 reads
For me, conference season begins with the new year, and ends with the PASS Summit (sorry, November and December SQL...
2012-04-17
679 reads
While attending a recent Windows Azure Quick Start, the presenter, Mike Benkovich (@mbenko) happened to show a table on his...
2012-04-17
582 reads
This morning, Microsoft released SQL Server 2008 R2 SP1 CU6, which is Build 10.50.2811.0. This Cumulative Update lists 20 fixes...
2012-04-17
2,731 reads
In the land of Oracle, if you want to prevent user access to your database, you stop the listener. Without...
2012-04-17
1,750 reads
Last week the SQL community and in particular the blogosphere, was buzzing with interest noise following the Microsoft Learning site...
2012-04-17
875 reads
Microsoft’s Corporate Vice President Brad Anderson announced today at the Microsoft Management Summit 2012 in Las Vegas that the next...
2012-04-17
1,012 reads
In my professional development presentation, I list the "soft skills" books that I have found most helpful in my career to date. You can find...
2012-04-16
1,575 reads
How can you achieve good enough without compromising the process/product? In the world of...
By Patrick
One of my customers recently wanted to rename each of the SQL audit files...
The post The pros and cons of self-service BI: What every industry leader should...
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