I'm using SQL Server 2019.
I'm using the Northwind Sample Microsoft Database
So I'm using the Orders table which looks like this:
,[CustomerID] ,[EmployeeID] ,[OrderDate] ,[RequiredDate] ,[ShippedDate] ,[ShipVia] ,[Freight] ,[ShipName] ,[ShipAddress] ,[ShipCity] ,[ShipRegion] ,[ShipPostalCode] ,[ShipCountry] FROM [Northwind].[dbo].[Orders] ORDER BY [OrderDate]
I'm trying to get Count of the order placed each day.
Desired Query Result
So my desired result will be to show the number of orders placed for each date like this mockup image.
On 07/04/1996 only one order was placed.
On 07/05/1996 only one order was placed.
On 07/08/1996 there were 2 orders placed.
..... and so on for every day there was an order placed
What is the best syntax for this result?
Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>