Question: Write SQL code to generate the total ordering cost (i.e., total sales amount) made by all orders. Here is a possible solution: SELECT SUM( Sub_Total_Amount)

Write SQL code to generate the total ordering cost (i.e., total sales amount) made by all orders. Here is a possible solution: SELECT SUM( Sub_Total_Amount) FROM ( SELECT ROUND(SUM(OrderDetails.Quantity)*Products.price,2) AS Sub_Total_Amount FROM OrderDetails JOIN Products ON OrderDetails.ProductID=Products.ProductID GROUP BY OrderDetails.ProductID)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!