← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Senior

Senior
May 2026

Summary

Meta DS interview with a meaty SQL prompt centered on a dating app funnel. One question, but it had a lot of moving parts and I probably underestimated how long it would take to think through cleanly.

Questions Asked (1)

Q1

You work on a dating app. Write a SQL report covering 2025-08-25 through 2025-09-01, with one row per day, gender, and age bucket (18-24, 25-34, 35-44, 45+). For each group compute: profile creation count, photo present rate, average completion rate (filled fields divided by total fields), distinct profile viewers, likes sent, and match rate (matches divided by views). Also return a separate result set of user IDs whose profiles are missing a photo as of 2025-09-01. Ages should be computed from birthdate at the report date. Return two result sets.

Product Analytics & MetricsData Modeling
Author's notes

The age bucketing tripped me up first.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and metric definitions, then build a daily spine and join the relevant tables to compute each metric per day, gender, and age bucket. Use CTEs to modularize the logic, and return two result sets: the aggregated report and the list of user IDs missing photos as of 2025-09-01.

Pro tip: Explicitly state your assumptions about ambiguous terms like 'photo present rate' and 'match rate' before writing SQL, and use a date spine to ensure all days are represented even if there is no activity.

1. Clarify requirements and assumptions

Ask about the schema, definitions of metrics (e.g., photo present rate, completion rate, match rate), and how to handle missing data. Confirm that ages are computed as of each report date.

2. Build a date spine and base tables

Generate a date series from 2025-08-25 to 2025-09-01. Create CTEs for profiles, photos, views, likes, and matches, filtered to the relevant date range.

3. Compute metrics per day, gender, and age bucket

Join the base tables to the date spine, calculate age buckets from birthdate, and aggregate metrics using conditional sums and counts. Ensure all combinations of day, gender, and age bucket are present.

4. Produce the second result set

Write a separate query to return user IDs whose profiles are missing a photo as of 2025-09-01, using a left join or anti-join on the photos table.

5. Validate and format output

Check for edge cases (e.g., division by zero, nulls) and ensure the output matches the required format: one row per day, gender, and age bucket for the first result set, and a list of user IDs for the second.

Key Points to Mention

  • Use a date spine to ensure all days are represented, even with no activity.
  • Define age buckets dynamically based on birthdate and report date.
  • Handle division by zero for rates (e.g., match rate) using NULLIF or CASE.
  • Distinct profile viewers should be counted per day, gender, and age bucket.
  • Photo present rate is the proportion of profiles with at least one photo.
  • Completion rate is the average of filled fields divided by total fields per profile.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.