Articles

SQLServerCentral Article

CData AWS Glue Connector for Salesforce Deployment Guide

AWS Glue is an ETL service from Amazon that enables you to prepare and load your data for storage and analytics. With Glue Studio, you can create no-code and low-code ETL jobs that work with data through CData Glue Connectors. In this article, we walk through configuring the CData Glue Connector for Salesforce and creating and […]

You rated this post out of 5. Change rating

2021-11-05

323 reads

SQLServerCentral Article

Azure Cosmos DB – HTAP using Azure Synapse Link

In this article, we will explore the HTAP capabilities of Cosmos DB. The goal is to derive real-time insights from transactional changes made to Cosmos DB, in a cost-effective manner with minimal overhead. I want the solution to be scalable, reliable and overall simple to maintain.

You rated this post out of 5. Change rating

2021-11-03

2,180 reads

SQLServerCentral Article

Configure the CData Cloud Add-On for Google Sheets

With Google Sheets you can create branded reports with data visualizations to share with your clients. Combined with CData Cloud, Google Sheets give you cloud-to-cloud access to data from the supported SaaS, Big Data and NoSQL sources for visualizations, dashboards, and more. In this article we explain how to use the CData Cloud Add-On to […]

You rated this post out of 5. Change rating

2021-11-01

582 reads

SQLServerCentral Article

dbatools - new functions for Database Mail

Background The dbatools module is broadly used and is an ever-growing set of useful commands. While looking for some inspiration I checked the old issues logged on the GitHub repository. Finally, I found this one Remove-DbaDbMail Profile and Account · Issue #4990 · sqlcollaborative/dbatools (github.com). The issue was more than 2.5 years old (32 months). […]

4.8 (5)

You rated this post out of 5. Change rating

2021-11-01

3,561 reads

Blogs

PASS Summit 2024 – A Very Different World

By

The last data centric conference I attended was the PASS Summit in 2019. A...

T-SQL Tuesday #180: Good enough is perfect

By

How can you achieve good enough without compromising the process/product? In the world of...

How to Convert FileTime to DateTime

By

One of my customers recently wanted to rename each of the SQL audit files...

Read the latest Blogs

Forums

What's New for the Microsoft Data Platform

By Steve Jones - SSC Editor

Comments posted to this topic are about the item What's New for the Microsoft...

Using Outer Joins

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Using Outer Joins

Closest to ProcDate

By boehnc

Not sure I have this 2nd left join correct. I need to grab the...

Visit the forum

Question of the Day

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-07
I 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.CustomerName

See possible answers