SSIS Lessons Learned, Or Not, And Mistakes Beginners Make
It’s been a while since I’ve used SSIS for anything of substantial complexity, and a lot longer than that since...
2014-06-12
786 reads
It’s been a while since I’ve used SSIS for anything of substantial complexity, and a lot longer than that since...
2014-06-12
786 reads
Did the list of states in the title catch your eye? That’s the list of states where PASS is trying...
2014-06-11
516 reads
Status and Name Please is my latest Question of the Day at SQLServerCentral. This is a fairly easy question, but...
2014-06-11
395 reads
2014-06-11
1,852 reads
I wrote Space Hoarders for SQLServerCentral, a discussion of why we – the DBA’s of course – are always blamed for the...
2014-06-10
466 reads
The results were posted Friday afternoon, I placed second in the voting with 214 votes from a total of 539...
2014-06-09
445 reads
Sunday I spent an hour going over various notes and thinking about what I’ve seen in the past couple PASS...
2014-06-09
351 reads
2014-06-09
166 reads
Didn’t get as much done this week as I’d hoped, but a little luck balanced that out! I do at...
2014-06-07
359 reads
I was catching up on reading the minutes of PASS Board meetings and found the following except in paragraph 2...
2014-06-06
366 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