Calculate and Find Average Contacts and Sync Percentage
Company: PayPal
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Technical Screen
Overview: This question evaluates proficiency in data aggregation, deduplication, and relational joins for computing user-level metrics such as average synced contacts and the percentage of users with at least one synced contact.
Tables
dw_peers(user_id BIGINT, synced_contact VARCHAR(15), date_synced DATE)
dw_users(user_id BIGINT, phone_number VARCHAR(15))
Hints
- Aggregate dw_peers by user_id and count contacts, e.g., COUNT(DISTINCT synced_contact).
- Average those per-user counts to get the average contacts per syncing user.