The Product Sales Analysis I SQL problem asks you to find the product name, year, and price for each sale record by joining the Sales table with the Product table. This easy SQL problem tests basic JOIN and column selection. The database interview pattern is demonstrated at its most fundamental.
Microsoft, Meta, Amazon, Google, and Bloomberg ask this as a quick JOIN verification problem. It tests that candidates know how to join two tables on a foreign key and select the appropriate columns.
Simple JOIN. SELECT p.product_name, s.year, s.price FROM Sales s JOIN Product p ON s.product_id = p.product_id.
Sales: (1,prod1,2008,10.00), (1,prod1,2009,20.00). Product: (prod1,"Nokia"). Result: [("Nokia",2008,10.00),("Nokia",2009,20.00)].
Product Sales Analysis I is the simplest JOIN problem. Master the pattern: identify the join key, select columns from both tables, write FROM table1 JOIN table2 ON condition. Practice joins with multiple tables progressively: 2-table join → 3-table join → self-join. Product Sales Analysis I through V forms a complete progression of SQL join and aggregation complexity.
| Title | Difficulty | Topics | LeetCode |
|---|---|---|---|
| Combine Two Tables | Easy | Solve | |
| Project Employees I | Easy | Solve | |
| Replace Employee ID With The Unique Identifier | Easy | Solve | |
| Article Views I | Easy | Solve | |
| Duplicate Emails | Easy | Solve |