PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep

Quick Overview

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.

  • Medium
  • Amazon
  • Data Manipulation (SQL/Python)
  • Business Intelligence Engineer

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.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Find recommended friend pairs by shared songs - Amazon (medium)
  • Find recommended friend pairs by shared listening - Amazon (easy)
  • Write SQL window functions for D7 retention - Amazon (medium)
  • Find daily first-order merchants with SQL - Amazon (Medium)
  • Design student–course data models and SQL - Amazon (Medium)