← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Meta Data Scientist interview with a SQL and stats-heavy technical screen built around Oculus app engagement data. Three questions, all interconnected, which I didn't fully anticipate going in.

Questions Asked (3)

Q1

Write a SQL query to identify the app with the highest total minutes used in the past 30 days.

Product Analytics & Metrics
Author's notes

Straightforward aggregation but I second-guessed myself on the date filter syntax for a moment.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and definitions (e.g., what 'app' means, how minutes are recorded, and whether 'past 30 days' includes today). Then write a query that aggregates total minutes per app over the last 30 days, orders by total minutes descending, and limits to the top result. Use a date filter relative to the current date and handle ties appropriately.

Pro tip: Mention that you would validate the result by checking for data completeness and considering time zone alignment, as Meta often deals with global user data. Also, discuss how you might handle ties or multiple apps with the same total minutes.

1. Clarify requirements and schema

Ask questions to understand the table structure, definitions of 'app', 'minutes used', and the exact time window (e.g., last 30 days from today). Confirm whether to include partial days and how to handle ties.

2. Aggregate minutes per app

Write a subquery or CTE that sums the minutes used for each app, filtering records to the last 30 days using a date condition like `date >= CURRENT_DATE - INTERVAL '30 days'`.

3. Rank and select top app

Order the aggregated results by total minutes descending and use `LIMIT 1` to get the top app. If ties are possible, consider using `RANK()` or `DENSE_RANK()` to identify all apps with the maximum total.

4. Validate and discuss edge cases

Mention potential issues like missing data, time zone differences, or apps with zero usage. Suggest ways to validate the query, such as cross-checking with a different aggregation or sampling.

Key Points to Mention

  • Use of date functions to filter the last 30 days (e.g., CURRENT_DATE - INTERVAL '30 days')
  • Aggregation with SUM and GROUP BY app identifier
  • Ordering and limiting to get the top result
  • Handling ties with window functions like RANK or DENSE_RANK
  • Consideration of time zones and data completeness
  • Assumptions about the schema (e.g., table name, columns for app, minutes, date)

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

Q2

Write a SQL query to calculate what percentage of total time spent in the past 30 days belongs to each app category.

Product Analytics & MetricsData Modeling
Author's notes

This is where I reached for a window function and I'm glad I did.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and definitions: what tables contain app usage data, how time spent is measured, and how apps map to categories. Then write a query that filters to the last 30 days, aggregates total time per category, and divides by the overall total to get percentages. Use a window function or subquery to compute the grand total for the percentage calculation.

Pro tip: Mention that you would validate the time-spent metric for edge cases like background usage or multiple sessions, and consider using a CTE for readability and performance. Also, discuss how you'd handle apps with no category or null values.

1. Clarify requirements and schema

Ask about the table structure, time-spent definition, and how app categories are assigned. Confirm the date range and whether 'past 30 days' includes today.

2. Filter and aggregate time per category

Write a subquery or CTE that filters events to the last 30 days, joins to a category mapping table, and sums time spent grouped by category.

3. Compute total time and percentages

Calculate the overall total time using a window function or a cross join with a total subquery, then divide each category's time by the total to get the percentage.

4. Format and order results

Round percentages to a reasonable number of decimals, order by percentage descending, and ensure the output includes category name and percentage.

5. Validate and discuss edge cases

Mention how you would test the query, handle null categories, and consider performance optimizations like indexing on date and app_id.

Key Points to Mention

  • Use of CTEs for readability and modularity
  • Window functions (SUM() OVER ()) to compute total without a self-join
  • Handling of NULL or unmapped app categories
  • Date filtering with DATE_SUB or equivalent for the last 30 days
  • Rounding and formatting percentages for presentation
  • Performance considerations: indexing, partitioning, and avoiding full table scans

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

Q3

How would you test whether users in the Social category are more consistently engaged than Game users?

A/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

This tripped me up more than I expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying what 'consistently engaged' means and how to measure it, then propose a robust metric like the coefficient of variation or a consistency score. Design an analysis comparing the distributions of engagement across categories, using statistical tests to account for differences in user base and potential confounders.

Pro tip: Emphasize the importance of defining engagement consistently and considering the user lifecycle; a common pitfall is comparing raw averages without accounting for frequency and recency, which can mislead. Also, mention that you'd validate findings with a holdout or longitudinal analysis to ensure robustness.

1. Define 'Consistently Engaged'

Clarify with stakeholders what consistency means: e.g., daily active usage over a period, low variance in session frequency, or a high ratio of active days. Choose a quantifiable metric such as the coefficient of variation of daily engagement or the proportion of days with activity.

2. Select and Prepare Data

Identify relevant engagement events (e.g., posts, likes, comments) for Social and Game users. Ensure data quality, handle missing values, and define the observation window (e.g., 30 days) and user cohort (e.g., new users).

3. Compute Consistency Metrics

For each user, calculate the chosen consistency metric (e.g., standard deviation of daily engagement, entropy of activity, or streak length). Aggregate these metrics by category to compare distributions.

4. Statistical Testing and Confounder Control

Use appropriate statistical tests (e.g., Mann-Whitney U, bootstrap) to compare consistency between categories. Control for confounders like user tenure, demographics, and overall activity level via stratification or regression.

5. Interpret and Validate

Assess practical significance (effect size) and validate findings with a holdout period or sensitivity analysis. Consider segmenting by user subgroups to uncover nuances.

Key Points to Mention

  • Define consistency operationally: e.g., low variance in daily engagement, high proportion of active days, or long streaks.
  • Use robust metrics like coefficient of variation, Gini coefficient, or entropy to capture consistency.
  • Account for confounders: user tenure, overall activity level, demographics, and platform differences.
  • Apply appropriate statistical tests (non-parametric if distributions are skewed) and report effect sizes.
  • Consider longitudinal analysis to see if consistency persists over time.
  • Validate findings with a holdout set or by replicating on a different time period.

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