⚠️ Today is the last day to secure next month's service! Donate now →
SQL code copied to buffer
RU PT FR
Task 32:

Sales by Category Percentage

Retrieve the total sales amount for each product category and calculate the percentage of each category's sales relative to the overall total sales. Your output should include the columns ProductCategoryName,TotalSalesAmountInCategory and PercentageOfTotalSales. 
Round the results to two decimal places and sort the output by the percentage of total sales in descending order.  

Question by: Iason Kas

Use SQL Server 2022 syntax to write your answer. Descriptions of tables are provided in the right pane.

Write your request in the field below and click the "Check it!" button.
Get hint
Copy code Clear editor

Hi! Could we please enable some services and cookies to improve your experience and our website?

Privacy & Cookie Policy.