asked on
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?
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
ASKER