← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Senior

Senior
May 2026

Summary

Meta DS technical screen, one SQL problem the whole time. Pretty focused on a specific metrics definition scenario for a messaging product, nothing behavioral at all.

Questions Asked (1)

Q1

Given a calls table and a user daily status table, write a SQL query to find what percentage of today's active users in Great Britain made or received more than 50 calls in the previous 7 days (excluding today).

Product Analytics & MetricsData Modeling
Author's notes

The join logic is where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Break the problem into three parts: identify today's active users in Great Britain from the user daily status table, compute the number of calls made or received by each user in the previous 7 days (excluding today) from the calls table, and then calculate the percentage of active GB users who had more than 50 calls in that period. Use a left join or subquery to combine the two datasets, ensuring that users with zero calls are included in the denominator.

Pro tip: Clarify the definition of 'active user' and 'made or received' (e.g., whether a call counts if the user is either caller or receiver) and confirm the date boundaries (previous 7 days excluding today) to avoid off-by-one errors. Also, consider using a CTE for readability and performance.

1. Identify today's active users in Great Britain

Filter the user daily status table for today's date and country = 'Great Britain' to get the set of active users. This forms the denominator.

2. Count calls per user in the previous 7 days

From the calls table, filter calls where the call date is between today-7 and yesterday (inclusive), and count calls where the user is either the caller or the receiver. Group by user ID.

3. Combine active users with call counts

Left join the active users with the call counts on user ID, so that users with no calls get a count of 0. Then filter for users with call count > 50.

4. Calculate the percentage

Compute the ratio of the number of active users with >50 calls to the total number of active users, multiplied by 100 to get a percentage.

Key Points to Mention

  • Definition of active user: typically based on user daily status table where status indicates activity (e.g., 'active').
  • Date handling: use current date or a parameter; ensure previous 7 days excludes today (e.g., date >= today - 7 and date < today).
  • Call counting: a call involves two users; count each call once per user if they are either caller or receiver, avoiding double counting if a user is both (unlikely).
  • Use of LEFT JOIN to include users with zero calls in the denominator.
  • Filtering for Great Britain: ensure country field is correctly used, possibly with ISO codes.
  • Performance considerations: use appropriate indexes, and consider pre-aggregating call counts if the table is large.

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