Clean and Summarize User Purchase Data Efficiently
Company: PayPal
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Onsite
Overview: This question evaluates proficiency in data cleaning, aggregation, and time-series manipulation within the Data Manipulation (SQL/Python) domain, focusing on filtering by group counts and calculating inter-event timing metrics.
Tables
transactions(user_id INTEGER, txn_timestamp TIMESTAMP, txn_value DECIMAL(10,2), txn_id INTEGER)
Hints
- First, aggregate by user_id and calendar month (e.g., using date_trunc('month', txn_timestamp)) to count monthly transactions.
- Disqualify any user who has at least one month with a transaction count less than 100.