← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Senior

Senior
Sep 2025Remote

Summary

Meta DS interview that was basically a two-hour SQL gauntlet. Three interconnected questions all built on the same schema, so if you misread the tables early on you were toast for the rest. Felt like a product analytics case study more than a traditional coding round.

Questions Asked (3)

Q1

Given a schema with feed impressions and likes, write a query that computes daily like-through-rate (distinct likers divided by distinct viewers) by platform and app version over a two-week window, then flags any segment where the rate drops by 5 or more percentage points on the last day compared to its prior 14-day average.

Product Analytics & MetricsRoot Cause AnalysisA/B Testing & Experimentation
Author's notes

This was the hardest of the three.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and definitions (e.g., what constitutes a viewer, liker, and the exact time window). Then outline a SQL approach using CTEs to compute daily distinct viewers and likers per platform and app version, calculate the like-through-rate, and compare the last day's rate to the prior 14-day average using window functions. Finally, flag segments where the drop is >= 5 percentage points.

Pro tip: Mention the importance of handling edge cases like missing data, timezone consistency, and ensuring distinct counts are accurate (e.g., using COUNT(DISTINCT user_id)). Also, discuss how to interpret the flag in a business context, such as potential bugs or user experience issues.

1. Clarify requirements and schema

Ask clarifying questions about the table structure, definitions of 'viewer' and 'liker', and the exact date range (e.g., last 14 days including or excluding the last day). Confirm that 'daily' means per calendar day and that platform and app version are dimensions.

2. Compute daily distinct viewers and likers

Write a query to aggregate the data by date, platform, and app version, counting distinct users who viewed and distinct users who liked. Ensure proper filtering for the two-week window.

3. Calculate daily like-through-rate

Compute the like-through-rate as distinct likers divided by distinct viewers for each segment and day. Handle division by zero (e.g., using NULLIF or CASE).

4. Compare last day to prior 14-day average

Use window functions to calculate the average like-through-rate over the prior 14 days (excluding the last day) for each segment. Then compute the difference between the last day's rate and this average.

5. Flag segments with significant drop

Identify segments where the difference is <= -0.05 (i.e., a drop of 5 percentage points or more). Output the flagged segments with relevant metrics.

Key Points to Mention

  • Use COUNT(DISTINCT user_id) for accurate distinct counts of viewers and likers.
  • Define the time window clearly: e.g., last 14 days including the last day, or prior 14 days plus the last day.
  • Handle division by zero when computing rates (e.g., NULLIF or CASE).
  • Use window functions (e.g., AVG() OVER (PARTITION BY platform, app_version ORDER BY date ROWS BETWEEN 14 PRECEDING AND 1 PRECEDING)) to compute the prior 14-day average.
  • Consider timezone consistency and data completeness (e.g., missing days).
  • Interpret the flag: a drop could indicate a bug, a change in user behavior, or an experiment effect; suggest further investigation.

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

Q2

Build a daily funnel query for two consecutive dates showing feed viewers, users who received a like impression, and users who actually liked a post, with stage-to-stage conversion rates at each step.

Product Analytics & MetricsData Modeling
Author's notes

Easier than it looked.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the funnel stages and define each metric precisely, then write a SQL query that aggregates daily counts for each stage and computes conversion rates between consecutive stages. Use a date filter for two consecutive dates and ensure the output includes both dates for comparison.

Pro tip: Mention the importance of defining a 'like impression' as a distinct event from viewing, and consider whether users can appear in multiple stages (e.g., a user who views and likes) – this affects whether you use distinct user counts or event counts.

1. Clarify definitions and assumptions

Confirm what each stage means: feed viewers (users who loaded the feed), users who received a like impression (users who saw a post with a like button), and users who liked a post (users who clicked like). Discuss whether these are unique users per day and how to handle multiple events per user.

2. Identify tables and date filtering

Determine the source tables (e.g., feed_views, impressions, likes) and the date column. Filter for the two consecutive dates, ensuring you use the correct timezone and date boundaries.

3. Write aggregation subqueries

For each date, compute the count of distinct users at each stage. Use conditional aggregation or separate subqueries to get the three counts per date.

4. Compute conversion rates

Calculate stage-to-stage conversion rates: (users who received like impression / feed viewers) and (users who liked / users who received like impression). Present as percentages or decimals.

5. Format and validate output

Structure the final output with columns: date, feed_viewers, like_impression_users, likers, conv_rate_1, conv_rate_2. Validate that counts are non-increasing across stages and check for anomalies.

Key Points to Mention

  • Use DISTINCT user counts to avoid double-counting users who have multiple events.
  • Define 'like impression' as a user seeing a post with a like button, not just any impression.
  • Ensure the two dates are consecutive and handle missing data (e.g., zero counts) appropriately.
  • Consider whether the funnel is per-user per-day or aggregated across days; typically it's per-day.
  • Use window functions or self-joins if needed to compare dates, but a simple GROUP BY date is sufficient.
  • Mention potential edge cases: users who like without viewing? (should be excluded or handled).

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

Q3

Write a data quality check that compares likes per session across platforms and app versions to catch logging regressions like a sudden zero on a specific version. How would you incorporate an outages table to avoid flagging real outages as logging bugs?

Root Cause AnalysisProduct Analytics & MetricsData Modeling
Author's notes

The outages join was the part I actually liked.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the metric (likes per session) and the dimensions (platform, app version) to monitor. Then design a data quality check that computes daily (or hourly) likes per session for each platform-version combination and flags deviations from expected baselines. Finally, incorporate an outages table to exclude periods of known outages from the anomaly detection, ensuring that only unexpected drops trigger alerts.

Pro tip: Use a robust baseline like a rolling median with a threshold based on historical variability (e.g., 3 MAD) to reduce false positives from natural fluctuations. Also, consider segmenting by platform and version to isolate issues quickly.

1. Define the metric and dimensions

Clearly specify the metric: likes per session, computed as total likes divided by total sessions. Identify the dimensions to monitor: platform (iOS, Android, Web) and app version.

2. Compute daily metric per segment

For each day (or hour), calculate likes per session for each platform-version combination. This creates a time series for each segment.

3. Establish a baseline and detect anomalies

Use historical data to compute a robust baseline (e.g., rolling median over past 7 days) and flag segments where the metric drops significantly (e.g., below 3 MAD or a percentage threshold).

4. Incorporate outages table

Join with the outages table to identify periods of known outages. Exclude those periods from anomaly detection or adjust thresholds accordingly to avoid false alarms.

5. Alert and investigate

Trigger alerts for anomalies not explained by outages. Provide context (e.g., affected platform-version, magnitude of drop) to facilitate root cause analysis.

Key Points to Mention

  • Metric definition: likes per session, aggregated by platform and app version.
  • Use of robust statistical methods (e.g., median, MAD) to handle non-normal data and outliers.
  • Importance of excluding known outages to reduce false positives.
  • Consideration of seasonality and day-of-week effects in baseline calculation.
  • Automation and alerting: integrate with monitoring systems and provide actionable insights.
  • Validation: backtest the check on historical data to tune thresholds and minimize false positives/negatives.

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