New month, new goals. Your help keeps the project moving forward. 🖥️ Support sqltest →
SQL code copied to buffer
Task 33:

Product Sales Analysis

SQL Server 2022
Retrieve a list of distinct products along with their category names, total sales amount, and their value relative to both their category and the overall total. The output should include columns for ProductID, ProductCategoryName, ProductName, SalesAmount, ValuePerCategory, and ValuePerTotal. 
Sort the results primarily by ValuePerTotal in descending order, followed by ValuePerCategory and SalesAmount.

Question by: Iason Kas

Expected result Columns: 6 · Rows: 295
ProductID ProductCategoryName ProductName SalesAmount ValuePerCategory ValuePerTotal

Sample rows open after wrong checks: 0 of 3

Write your query below and click "Check it!". Tables are described in the right pane.

The query result will appear here. Ctrl+Enter - Run query

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

Privacy & Cookie Policy.