← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Meta DS interview with a product health angle, basically one meaty SQL question dressed up as a real business scenario. The Oculus usage framing was a nice touch, made it feel less like a leetcode grind and more like actual work.

Questions Asked (1)

Q1

You're given a table of Oculus headset session data. First, define what 'unhealthy' usage looks like as a SQL-expressible rule (e.g. more than 120 continuous minutes per day for at least 3 consecutive days in the past month). Then write SQL to return the count of unhealthy users, total active users, and the percentage of unhealthy users over the last 30 days.

Product Analytics & MetricsData Modeling
Author's notes

The open-ended part tripped me up more than the SQL itself.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business definition of 'unhealthy' usage with the interviewer, then translate it into a precise SQL rule using session-level data. Write a query that aggregates daily usage per user, identifies users meeting the unhealthy criteria over the last 30 days, and computes the required metrics.

Pro tip: Always state your assumptions about the data schema (e.g., session start/end times, user_id, date) and edge cases (e.g., multiple sessions per day, timezone) before writing SQL—this shows you think like a data scientist, not just a coder.

1. Clarify the definition and assumptions

Ask clarifying questions to define 'unhealthy' usage (e.g., continuous minutes, consecutive days) and confirm the table schema (columns like user_id, session_start, session_end). State any assumptions you make.

2. Aggregate daily usage per user

Write a subquery to calculate total continuous minutes per user per day, handling overlapping sessions if necessary. Use date functions to group by day.

3. Identify unhealthy users

Apply the rule (e.g., >120 minutes per day for at least 3 consecutive days) using window functions or self-joins to find users meeting the criteria within the last 30 days.

4. Compute the metrics

Calculate the count of unhealthy users, total active users (distinct users with any session in the last 30 days), and the percentage of unhealthy users.

5. Write the final SQL query

Combine the subqueries into a single SQL statement that returns the three metrics. Use CTEs for readability and ensure date filters are applied correctly.

Key Points to Mention

  • Definition of 'unhealthy' usage: specify continuous minutes threshold and consecutive days requirement.
  • Handling multiple sessions per day: sum durations or consider gaps to determine continuous usage.
  • Date filtering: use the last 30 days relative to the current date or a specified date.
  • Use of window functions (e.g., LAG, LEAD) or self-joins to detect consecutive days.
  • Calculation of percentage: (unhealthy users / total active users) * 100.
  • Edge cases: users with no sessions, timezone differences, and data completeness.

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