Question
SQL. Management at AdventureWorks wants to determine the day of the week which have the most online sales in 2012. You will use the Sales.SalesOrderHeader
SQL. Management at AdventureWorks wants to determine the day of the week which have the most online sales in 2012. You will use the Sales.SalesOrderHeader table. Sales are based on the date they were ordered. In addition to aggregate functions, you will need the following function DATENAME(). List the Day of the Week by Name, Total Revenue (based on the SubTotal), the number of orders and the Revenue per Order. There are at least two different ways to obtain Revenue per Order. Include both as separate columns. Ensure all columns have a name. Sort the results by the Revenue per Order with the largest first.
8 SalesOrder Header (Sales) Sales OrderID Revision Number Order Date DueDate Ship Date Status OnlineOrderFlag SalesOrderNumber Purchase OrderNumber Account Number CustomerID Sales PersonlD TerritoryID BillToAddressID Ship ToAddressID Ship MethodID Credit CardID CreditCard ApprovalCode Currency Ratels Sub Total TaxAmt Freight TotalDue Comment rowguid ModifiedDate 8 SalesOrder Header (Sales) Sales OrderID Revision Number Order Date DueDate Ship Date Status OnlineOrderFlag SalesOrderNumber Purchase OrderNumber Account Number CustomerID Sales PersonlD TerritoryID BillToAddressID Ship ToAddressID Ship MethodID Credit CardID CreditCard ApprovalCode Currency Ratels Sub Total TaxAmt Freight TotalDue Comment rowguid ModifiedDateStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started