WhatsApp Messages Delivered but Never Read Within a Day
Last updated: November 29, 2026
Quick Overview
WhatsApp logs sent, delivered, and read receipts as separate events, and receipts can be retried and duplicated. For each sender country, compute the share of messages sent yesterday that were delivered but not read within 24 hours of delivery.
Meta
November 29, 20260
0
0 solved
WhatsApp logs sent, delivered, and read receipts as separate events, and receipts can be retried and duplicated. For each sender country, compute the share of messages sent yesterday that were delivered but not read within 24 hours of delivery.
Receipt pipelines at WhatsApp are a good test of joining several event types to a single message grain. The interviewer checks that you collapse duplicate receipts before joining and pick the right timestamps.
What the Interviewer Expects
- Collapses each receipt type to one row per message with MIN timestamp
- LEFT JOINs delivered and read onto sent messages
- Applies the 24 hour window relative to delivery
- Defines the denominator clearly (sent vs delivered)
- Joins sender country from a users table without fan-out
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- How would you handle group messages with many recipients?
- What if read receipts are disabled by the recipient's privacy setting?
- How would you trend this by recipient app version?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
msg_events(message_id, event_type, event_ts) with event_type in ('sent', 'delivered', 'read'), possibly duplicated by retries. messages(message_id, sender_id) and users(user_id, country). One-to...
Approach
Pivot the events into one row per message with conditional MIN, which also removes duplicates. Then filter to messages sent yesterday that were delivered, and flag "not read within 24 hours of deliver...