PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick 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.

  • Medium
  • Meta
  • Data Manipulation (SQL/Python)
  • Data Scientist

Identify Top 10 Users by Average Call Duration

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

video_calls | call_id | user_id | start_time | end_time | |---------|---------|----------------------|----------------------| | 1 | 101 | 2023-07-01 09:00:00 | 2023-07-01 09:45:00 | | 2 | 102 | 2023-07-01 10:15:00 | 2023-07-01 10:40:00 | | 3 | 101 | 2023-07-02 14:05:00 | 2023-07-02 14:25:00 | | 4 | 103 | 2023-07-02 15:00:00 | 2023-07-02 16:30:00 | | 5 | 102 | 2023-07-03 11:20:00 | 2023-07-03 12:00:00 | ##### Scenario A video-calling product team wants to know which users had the longest average call duration over the last 7 days. ##### Question Write a SQL query that returns the top 10 users by average call duration (in minutes) for calls started in the last 7 days. ##### Hints Compute duration as TIMESTAMPDIFF, filter on start_time, use ORDER BY and LIMIT.

Quick Answer: 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.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,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

  • Compute ad impression conversion rates - Meta (medium)
  • Count unconnected posts and reactions - Meta (medium)
  • Count heavy callers in 7 days - Meta (medium)
  • Write SQL for call metrics - Meta (medium)
  • Write SQL for multi-account metrics - Meta (medium)