PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Data Manipulation (SQL/Python)/Meta

Compute Heavy-Caller Percentages

Last updated: Apr 2, 2026

Quick Overview

This question evaluates proficiency in time-windowed data aggregation, user-level counting and percentage calculations using SQL or Python for analytics tasks.

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

Compute Heavy-Caller Percentages

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: hard

Interview Round: Technical Screen

You are given two tables that track voice calls and daily active users for a messaging app. **Table: `call_events`** - `call_id` BIGINT — unique call identifier - `event_time` TIMESTAMP — time when the call started, stored in UTC - `caller_user_id` BIGINT — user who initiated the call - `recipient_user_id` BIGINT — user who received the call - `country_code` STRING — country of the call session, using ISO-style country codes such as `GB` **Table: `daily_active_users`** - `activity_date` DATE — date of user activity in UTC - `user_id` BIGINT — active user identifier - `country_code` STRING — user country on that date Assume: - The analysis date is the most recent date available in `daily_active_users`. - The phrase **"last 7 days"** means the 7-day window ending on the analysis date, inclusive. - For call-volume calculations, each row in `call_events` represents one completed call attempt. - For question 2, a user's total call count includes both roles: calls made as caller and calls received as recipient. - `GB` refers to users in Great Britain. Write SQL for the following two tasks: 1. Compute the **percentage of distinct callers** who made **at least 20 calls** in the last 7 days. - A "caller" is defined using `caller_user_id` only. - Output columns: - `analysis_date` DATE - `pct_callers_ge_20` DOUBLE 2. Compute the **percentage of GB daily active users** on the analysis date who had **at least 50 total calls** in the last 7 days. - Total calls = calls as `caller_user_id` + calls as `recipient_user_id`. - The denominator should be GB users who are active on the analysis date in `daily_active_users`. - Output columns: - `analysis_date` DATE - `pct_gb_dau_ge_50_calls` DOUBLE

Quick Answer: This question evaluates proficiency in time-windowed data aggregation, user-level counting and percentage calculations using SQL or Python for analytics tasks.

Related Interview 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)
Meta logo
Meta
Jan 2, 2026, 12:00 AM
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
3
0

You are given two tables that track voice calls and daily active users for a messaging app.

Table: call_events

  • call_id BIGINT — unique call identifier
  • event_time TIMESTAMP — time when the call started, stored in UTC
  • caller_user_id BIGINT — user who initiated the call
  • recipient_user_id BIGINT — user who received the call
  • country_code STRING — country of the call session, using ISO-style country codes such as GB

Table: daily_active_users

  • activity_date DATE — date of user activity in UTC
  • user_id BIGINT — active user identifier
  • country_code STRING — user country on that date

Assume:

  • The analysis date is the most recent date available in daily_active_users .
  • The phrase "last 7 days" means the 7-day window ending on the analysis date, inclusive.
  • For call-volume calculations, each row in call_events represents one completed call attempt.
  • For question 2, a user's total call count includes both roles: calls made as caller and calls received as recipient.
  • GB refers to users in Great Britain.

Write SQL for the following two tasks:

  1. Compute the percentage of distinct callers who made at least 20 calls in the last 7 days.
    • A "caller" is defined using caller_user_id only.
    • Output columns:
      • analysis_date DATE
      • pct_callers_ge_20 DOUBLE
  2. Compute the percentage of GB daily active users on the analysis date who had at least 50 total calls in the last 7 days.
    • Total calls = calls as caller_user_id + calls as recipient_user_id .
    • The denominator should be GB users who are active on the analysis date in daily_active_users .
    • Output columns:
      • analysis_date DATE
      • pct_gb_dau_ge_50_calls DOUBLE

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Data Manipulation (SQL/Python)•More Meta•More Data Scientist•Meta Data Scientist•Meta Data Manipulation (SQL/Python)•Data Scientist Data Manipulation (SQL/Python)
PracHub

Master your tech interviews with 8,000+ 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.