Question: Write a SQL statement that returns one row for each category and calculate total sum and total discount of the products sold in that category:

Write a SQL statement that returns one row for each category and calculate total sum and total discount of the products sold in that category: The category_name column from the Category table Distinct product count that was sold in each category The Sum of the (Item Price multiplied by the quantity) in the Order_Items table per Category The Sum of the (Discount amount multiplied by the quantity) in the Order_items table per Category Sort the result set in descending sequence by the item price total for each category
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
