Medium
INNER JOIN

Product Sales Summary

For each product, show the total quantity sold and total revenue from order_items. Include product name. Return columns: product_name, total_quantity, total_revenue. Order results by: total_revenue DESC.

Preparing the interactive SQL workspace...

Challenge overview

What you will practice

For each product, show the total quantity sold and total revenue from order_items. Include product name. Return columns: product_name, total_quantity, total_revenue. Order results by: total_revenue DESC.

Difficulty
Intermediate
SQL concept
INNER JOIN

Public schema and sample data

customers

id INTEGERname TEXTemail TEXTcountry TEXTjoined_date TEXT
1Acme Corpacme@corp.comUSA2020-01-15
2TechStart Ltdts@techstart.ioUK2020-03-22
3DataFlow Incinfo@dataflow.comUSA2021-06-10

products

id INTEGERname TEXTcategory TEXTprice REALstock INTEGER
1Analytics DashboardSoftware299999
2Data WarehouseInfrastructure149950
3ML PipelineSoftware799999

orders

id INTEGERcustomer_id INTEGERorder_date TEXTtotal_amount REALstatus TEXT
112024-01-102697completed
222024-01-15799completed
312024-02-011499completed

order_items

id INTEGERorder_id INTEGERproduct_id INTEGERquantity INTEGERunit_price REAL
1113299
214899
3231799