logo

Oracle NextGen

score

SQL Challenge

Challenge #8 – Product Categories Revenue

MediumGo Back
Challenge Overview
Calculate total revenue for each product category and show only categories with revenue over $500.

Requirements

  • Return columns: category, total_revenue.
  • Join products and sales tables.
  • Group by category and filter for total_revenue > 500.
  • Order by total_revenue descending.
Sample Dataset
Preview the schema and seeded rows you can query against.

products

Product catalog.

Columns
NameTypeNotes
product_idINTPrimary key
product_nameVARCHARProduct name
categoryVARCHARCategory
Sample Rows
product_idproduct_namecategory
1LaptopElectronics
2PhoneElectronics
3DeskFurniture
4ChairFurniture
5PenStationery

sales

Sales transactions.

Columns
NameTypeNotes
sale_idINTPrimary key
product_idINTForeign key
quantityINTQuantity sold
priceDECIMALUnit price
Sample Rows
sale_idproduct_idquantityprice
112999.99
225699.99
333299
444150
55202.5
SQL Playground
Loading editor…

Result Preview

Awaiting Run

Run your query to see the dataset preview.