Identify Top 10 Users by Average Call Duration
Company: Meta
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Onsite
Overview: This question evaluates SQL-based data manipulation and time-series aggregation skills, specifically computing per-user metrics from timestamped event data such as call durations.
Tables
video_calls(call_id INTEGER, user_id INTEGER, start_time DATETIME, end_time DATETIME)
Hints
- Compute the duration of each call as the difference between end_time and start_time, converted to minutes (e.g., EXTRACT(EPOCH FROM (end_time - start_time)) / 60.0 in PostgreSQL).
- Filter rows so that start_time is between 2023-06-27 (inclusive) and 2023-07-04 (exclusive).