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

Compute percent of active users with 50+ calls

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a data scientist's competence in Data Manipulation (SQL/Python), focusing on SQL aggregation, joining call and user snapshot tables, temporal filtering, and computing user-level engagement metrics across incoming and outgoing call records.

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

Compute percent of active users with 50+ calls

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: easy

Interview Round: Technical Screen

## Problem You work on a Messenger-like app. You want to measure how many **active users in Great Britain (GB) today** have been heavy callers recently. ### Tables Assume two tables (names can vary). #### 1) `calls` One row per call record. - `call_id` (STRING, primary key) - `caller_id` (STRING) - `receiver_id` (STRING) - `date` (STRING) — call date in string format (e.g., `'2025-11-06'`) - `duration` (INT) — call duration (seconds) #### 2) `user_daily_status` One row per user per day describing user attributes and activity. - `user_id` (STRING) - `country` (STRING) - `is_active` (INT) — `1` if the user is active on that date, else `0` - `date` (STRING) — snapshot date in string format (e.g., `'2025-11-06'`) ### Definitions / assumptions - “GB active users today” = users with `country = 'GB'`, `is_active = 1` on **today’s** snapshot date. - “Previous seven days” = the 7-day lookback window **excluding today**, i.e. `[today - 7 days, today - 1 day]`. - A user’s “call records” count includes both: - outgoing calls where the user is the `caller_id`, and - incoming calls where the user is the `receiver_id`. - Count calls as number of call records (e.g., count of `call_id`). ## Task Write a SQL query to compute: - the **percentage** of today’s GB active users who had **more than 50** call records in the previous 7 days. ### Output Return at least: - `as_of_date` - `active_users_today` (denominator) - `active_users_gt_50_calls_last_7d` (numerator) - `pct_active_users_gt_50_calls_last_7d` (You may assume your SQL dialect provides a way to parse the date string into a date type.)

Quick Answer: This question evaluates a data scientist's competence in Data Manipulation (SQL/Python), focusing on SQL aggregation, joining call and user snapshot tables, temporal filtering, and computing user-level engagement metrics across incoming and outgoing call records.

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
Dec 8, 2025, 12:00 AM
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
7
0

Problem

You work on a Messenger-like app. You want to measure how many active users in Great Britain (GB) today have been heavy callers recently.

Tables

Assume two tables (names can vary).

1) calls

One row per call record.

  • call_id (STRING, primary key)
  • caller_id (STRING)
  • receiver_id (STRING)
  • date (STRING) — call date in string format (e.g., '2025-11-06' )
  • duration (INT) — call duration (seconds)

2) user_daily_status

One row per user per day describing user attributes and activity.

  • user_id (STRING)
  • country (STRING)
  • is_active (INT) — 1 if the user is active on that date, else 0
  • date (STRING) — snapshot date in string format (e.g., '2025-11-06' )

Definitions / assumptions

  • “GB active users today” = users with country = 'GB' , is_active = 1 on today’s snapshot date.
  • “Previous seven days” = the 7-day lookback window excluding today , i.e. [today - 7 days, today - 1 day] .
  • A user’s “call records” count includes both:
    • outgoing calls where the user is the caller_id , and
    • incoming calls where the user is the receiver_id .
  • Count calls as number of call records (e.g., count of call_id ).

Task

Write a SQL query to compute:

  • the percentage of today’s GB active users who had more than 50 call records in the previous 7 days.

Output

Return at least:

  • as_of_date
  • active_users_today (denominator)
  • active_users_gt_50_calls_last_7d (numerator)
  • pct_active_users_gt_50_calls_last_7d

(You may assume your SQL dialect provides a way to parse the date string into a date type.)

Submit Your Answer

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