← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

SQL-heavy technical screen for a Data Scientist role at Meta. Two questions, both centered on the calls table, and the hints they gave were basically the solution outline so it wasn't as brutal as it sounds.

Questions Asked (2)

Q1

Write a SQL query to return the top 10 users who initiated the most calls in the last 7 days.

Product Analytics & MetricsData Modeling
Author's notes

Pretty standard stuff.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the schema and definitions (e.g., what constitutes a call, how to handle time zones, and whether 'initiated' means caller). Then write a query that filters calls from the last 7 days, groups by user, counts calls, orders descending, and limits to 10. Be prepared to discuss edge cases like duplicate calls or missing data.

Pro tip: Mention that you would validate the query by checking the distribution of call counts and ensuring the time window is correctly aligned with the business definition of 'last 7 days' (e.g., rolling 7 days vs. previous calendar week).

1. Clarify requirements and schema

Ask about the table structure (e.g., calls table with caller_id, receiver_id, call_time, etc.) and define 'initiated' (likely caller_id). Confirm the time window: last 7 days from current date or from a specific date?

2. Filter and aggregate

Write a subquery or CTE to filter calls where call_time is within the last 7 days and caller_id is not null. Then group by caller_id and count the number of calls.

3. Rank and limit

Order the aggregated results by call count descending and limit to 10. Consider using a window function if ties need special handling (e.g., RANK() to include all tied users).

4. Handle edge cases

Discuss how to handle ties (e.g., using RANK() instead of LIMIT), time zones, and potential data quality issues like duplicate call records.

Key Points to Mention

  • Definition of 'initiated' (caller_id vs. receiver_id)
  • Time window: rolling 7 days vs. calendar week, and time zone considerations
  • Use of COUNT(DISTINCT call_id) if duplicates exist
  • Handling ties with RANK() or DENSE_RANK() instead of LIMIT
  • Performance considerations: indexing on call_time and caller_id
  • Validation: checking results against expected distribution or business logic

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 find what percentage of active users in France were on a video call yesterday.

Product Analytics & MetricsData Modeling
Author's notes

This one had more moving parts.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the definitions of 'active user', 'video call', and 'yesterday' to ensure alignment with business logic. Then, structure the query to first identify the denominator (active users in France yesterday) and numerator (those who had a video call yesterday), and finally compute the percentage. Use appropriate date functions and joins to combine user activity and call data.

Pro tip: Mention that you would validate the query by checking edge cases, such as users who were active but had no calls, and ensure that the time zone is correctly handled for 'yesterday' in France. Also, discuss how you might optimize the query for performance if the tables are large.

1. Clarify Definitions

Define what constitutes an 'active user' (e.g., logged in, performed any action) and a 'video call' (e.g., initiated or participated in a call). Confirm the time frame for 'yesterday' and the country filter for France.

2. Identify Data Sources

Determine which tables contain user activity data, video call events, and user location information. Consider if a single table can provide all necessary data or if joins are required.

3. Compute Denominator

Write a subquery to count distinct active users in France for yesterday. Use appropriate date functions and filters.

4. Compute Numerator

Write a subquery to count distinct users in France who had a video call yesterday. Ensure that these users are also part of the active user set if the definition requires it.

5. Calculate Percentage

Combine the numerator and denominator to compute the percentage, using division and multiplication by 100. Handle potential division by zero.

Key Points to Mention

  • Definition of 'active user' and 'video call' – clarify with stakeholders if ambiguous.
  • Use of DISTINCT counts to avoid double-counting users with multiple events.
  • Time zone considerations for 'yesterday' in France (e.g., Europe/Paris time zone).
  • Handling of NULLs or missing data in joins.
  • Performance optimization: filtering early, using indexes, or pre-aggregating if needed.
  • Validation: cross-check with known metrics or run on a sample to ensure correctness.

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