SQLSaturday in Houston
I will be speaking at the Houston SQLSaturday this upcoming Saturday (April 21st). Below is info on my session, which...
2012-04-16
622 reads
I will be speaking at the Houston SQLSaturday this upcoming Saturday (April 21st). Below is info on my session, which...
2012-04-16
622 reads
I suppose there is an almost limitless number of mistakes that managers can do and do make, it’s the nature...
2012-04-16
1,001 reads
Many times we need to alter the table definition by adding , deleting or updating a column in the table. In...
2012-04-15
1,405 reads
Derived tables:- Derived tables are the tables which are created on the fly with the help of the Select statement. It is...
2012-04-15
17,995 reads
Data growth is related to Moore’s law. As computers get faster and more powerful, we are using them to process...
2012-04-15
7,753 reads
MS has announced the new road for the SQL Server Certifications. All of the interested folks knows that the old...
2012-04-14
2,061 reads
Pivot Table:- Pivot tables are used to summarize and display the data, specially in case of report data by means...
2012-04-14
39,563 reads
Date: May 19, 2012
Location: SQLSaturday #119, Chicago
Abstract:
Ever thought about trying your hand at blogging? Or maybe you’ve started a blog...
2012-04-14
563 reads
I’m very excited for the invitation to present at TechDays Albania 2012, which will be held on April 19, 2012...
2012-04-14
1,826 reads
Linchpin People, LLC is an organization led by Brian Moran and Andy Leonard with Mike Walsh and Robert Pearl as...
2012-04-13
1,002 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