PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates a candidate's ability to perform SQL-based data manipulation and analytics, testing skills such as aggregations, joins to user metadata, percentage/rate calculations, and distinct-count reasoning over call records.

  • medium
  • Meta
  • Data Manipulation (SQL/Python)
  • Product Analyst

Write SQL for call analytics

Company: Meta

Role: Product Analyst

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Onsite

You are given two tables. **Table: `calls`** - `call_id` BIGINT - `sender_id` BIGINT - `receiver_id` BIGINT - `call_ts` TIMESTAMP — stored in UTC - `pickup` CHAR(1) — `'Y'` if the call was picked up, `'N'` otherwise - `call_type` VARCHAR — either `'video'` or `'voice'` Assume each row represents one call attempt. **Table: `users`** - `user_id` BIGINT - `country` VARCHAR Assume `calls.sender_id = users.user_id` when you need the caller's country. Unless otherwise stated, compute results over the full available dataset. Write SQL for the following: 1. Return the total number of calls and the number of picked-up calls for each `call_type`. - Output columns: `call_type`, `total_calls`, `picked_up_calls` 2. For a given country parameter, compute the percentage of calls placed by senders in that country that were picked up. - Output columns: `country`, `pickup_rate_pct` - Treat `pickup_rate_pct` as `100.0 * picked_up_calls / total_calls` 3. Compute the percentage of distinct callers who have made at least one `video` call and at least one `voice` call. - Denominator: all distinct `sender_id` values in `calls` - Output column: `pct_callers_both_types`

Quick Answer: This question evaluates a candidate's ability to perform SQL-based data manipulation and analytics, testing skills such as aggregations, joins to user metadata, percentage/rate calculations, and distinct-count reasoning over call records.

Last updated: May 7, 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)