Identify Customers Purchasing Every Product in Catalog
Company: Amazon
Role: Business Intelligence Engineer
Category: Data Manipulation (SQL/Python)
Difficulty: Medium
Interview Round: Onsite
X_PURCHASES
+-------------+---------+
| customer_id | pro_key |
+-------------+---------+
| 1 | A |
| 1 | B |
| 2 | A |
+-------------+---------+
PRODUCT_CATALOG_Y
+---------+
| pro_key |
+---------+
| A |
| B |
+---------+
##### Scenario
E-commerce team wants to identify customers who have purchased every product currently in the catalog.
##### Question
Using SQL (or Python), return the customer_id values who have at least one purchase in X_PURCHASES for every pro_key that appears in PRODUCT_CATALOG_Y.
##### Hints
Group by customer and compare counts, or use NOT EXISTS to filter missing products.
Quick Answer: The question evaluates a candidate's ability to perform data manipulation in SQL or Python, focusing on aggregation, grouping, and set-coverage concepts (relational division) to determine which customers have purchased every product in a catalog.