Share of Users by Combination of Meta Apps Used in a Week

Last updated: November 29, 2026

Quick Overview

Given weekly activity rows (user_id, app) where app is Facebook, Instagram, WhatsApp or Messenger, compute the share of weekly users in each exact app combination (for example 'Facebook+Instagram'), plus a matrix of pairwise overlap: for app A, the share of A users who also use B.

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

0

0

0 solved


Given weekly activity rows (user_id, app) where app is Facebook, Instagram, WhatsApp or Messenger, compute the share of weekly users in each exact app combination (for example 'Facebook+Instagram'), plus a matrix of pairwise overlap: for app A, the share of A users who also use B.

Family-of-apps reporting at Meta asks how much audiences overlap across Facebook, Instagram, WhatsApp and Messenger. In an onsite analytics coding round this tests building a user-by-app indicator matrix and deriving both exclusive combinations and conditional overlaps from it.

What the Interviewer Expects
  • Build a deduplicated user by app boolean matrix
  • Label each user's exact combination with a stable ordering of apps
  • Compute combination shares that sum to 1
  • Compute conditional overlap P(uses B | uses A) with matrix algebra
  • Explain the difference between exclusive and overlapping counts
Key Topics to Cover
crosstab
indicator matrix
conditional probability
matrix multiplication
family of apps
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 visualize this for executives (UpSet plot versus Venn)?
  • How would you handle users who are not logged in across apps (no shared ID)?
  • How would you track week-over-week movement between combinations?
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

activity(user_id, app) for one week, possibly with duplicate rows per user and app. A user counts in exactly one combination. The overlap matrix is asymmetric: P(Instagram | WhatsApp) need not equal...

Approach

pd.crosstab(user_id, app).clip(upper=1) gives a 0/1 matrix M with a fixed column order. A combination label is the '+'-join of column names where the row is 1; value_counts(normalize=True) gives s...


Submit Your Answer
Markdown supported