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:
SELECT [OrderID]
,[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 >>
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.