Split WhatsApp Users into Messaging Quartiles and Compare Call Usage

Last updated: November 29, 2026

Quick Overview

Assign active WhatsApp users to quartiles by messages sent in the last 28 days using NTILE, then report each quartile's message range, average call minutes, and the share of users who made at least one call.

Meta
Data Manipulation (SQL/Python)
Data Scientist
Meta
November 29, 2026
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Assign active WhatsApp users to quartiles by messages sent in the last 28 days using NTILE, then report each quartile's message range, average call minutes, and the share of users who made at least one call.

Understanding whether heavy messagers also adopt calling is a typical WhatsApp product question, and quantile bucketing is a staple of Meta analytics screens. The interviewer wants NTILE used correctly and an honest discussion of how it splits tied values across buckets.

What the Interviewer Expects
  • Aggregates 28-day messages and call minutes per user
  • Applies NTILE(4) ordered by messages
  • Reports min and max messages per quartile to show bucket boundaries
  • Computes average call minutes and call adoption per quartile
  • Explains that NTILE can put identical values into different quartiles
Key Topics to Cover
NTILE
quantile buckets
ties in bucketing
feature adoption
correlation vs causation
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you make buckets tie-safe, so all users with the same count land in the same quartile?
  • Is this correlation evidence that messaging drives calling? What would you need to say more?
  • How would you do the same split per country, and why might quartile boundaries differ a lot?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

Table: wa_user_daily(user_id, ds, messages_sent, call_minutes). Active users are those with at least one message in the window. The window is the 28 days ending yesterday....

Approach

Sum the 28 days per user, keep users with messages > 0, apply NTILE(4) OVER (ORDER BY messages), then aggregate per quartile. Showing min and max messages per quartile makes boundaries visible, whic...


Submit Your Answer
Markdown supported