Compute High-Call Usage Rates
Company: Meta
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: hard
Interview Round: Technical Screen
Overview: This question evaluates a candidate's ability to perform advanced data manipulation and analytical SQL tasks, including joins, aggregations, timezone-aware date handling, rolling window metrics, distinct user counting, and counting user participations across roles.
Tables
users(user_id BIGINT, country_code VARCHAR(2))
calls(call_id BIGINT, caller_id BIGINT, recipient_id BIGINT, started_at TIMESTAMP)
Hints
- Derive report_date as DATE(started_at). For January dates, Europe/London is aligned with UTC, so no offset is needed.
- Build the 7-day inclusive window as [report_date - 6 days, report_date] and aggregate outgoing calls per caller over that window.