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
Get step-by-step solutions from verified subject matter experts
