Using sys.dm_exec_requests to find a blocking chain and much more
As with every good DBA's toolbox, my blocking list query using sys.dm_exec_requests is evolving.
I've added the following features:
The query execution...
2012-04-19
3,433 reads
As with every good DBA's toolbox, my blocking list query using sys.dm_exec_requests is evolving.
I've added the following features:
The query execution...
2012-04-19
3,433 reads
IIF() function is new to SQL Server family of functions. It is a brand new logical function being introduced with SQL Server 2012 that allows you to perform IF..THEN..ELSE...
2012-04-19
21 reads
Andy Leonard blogged about a gotcha when creating SSIS projects using SSDT yesterday. He showed that you can use any...
2012-04-19
1,502 reads
Last time, I talked about how clients communicate with SQL Server through TDS endpoints and how to disable endpoints to...
2012-04-18
2,127 reads
Last week, our log shipping setup had a problem, so I spent some time to dig into the log shipping....
2012-04-18
2,509 reads
Yesterday, I received two mails from the Microsoft Certification Program Team about two new certification earned:
1. Microsoft Certified Solutions Associate...
2012-04-18
1,703 reads
Thursday’s (May 17th, 2012) PASS Data Architecture Virtual Chapter has Mike demonstrating some cool Table Partitioning scripts which I was...
2012-04-18
548 reads
Just as with the "soft skills" books, in my professional development presentation, I list the professional productivity books that I have found most helpful in my...
2012-04-18
910 reads
I wouldn’t recommend you use any of the tools in this article for attacking anyone, but they could help you...
2012-04-18
1,236 reads
As a follow-up to my SQL Server 2012: New Certification Info, Microsoft Learning has announced the certification tracks for the SQL Server...
2012-04-18
7,437 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