What the Shelf Never Sold
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant feedback.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L3
Problem
A merchandising team needs a revenue report spanning the whole catalog, where a product's revenue is the total amount buyers were charged across all of its sales. List every product with that revenue rounded to two decimals, and a product that never sold a single unit should read zero.
Summary
Some products never moved a single unit. They still belong on the report.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and checks it automatically.