The Latest Transaction Per Product
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L5
Problem
The catalog dashboard needs each product paired with its most recent sale. For every product, show the product details alongside the most recent transaction amount and date. Some products have hundreds of transactions, so only the latest should appear.
Summary
Every product has a last sale. When was it?
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.