← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Meta DS interview with a SQL and metrics design question around marketplace shop visibility. Pretty applied, less about syntax and more about whether you can actually think through a business problem with data.

Questions Asked (1)

Q1

Given a shops table and a page_views table, write SQL to compute daily page views per shop. Then design and calculate a metric that shows whether shops created in the last 30 days get more visibility than older shops.

Product Analytics & MetricsA/B Testing & ExperimentationData Modeling
Author's notes

The SQL part was fine, just a join and a group by date and shop_id.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by writing a clear SQL query that joins the shops and page_views tables on shop_id and groups by shop_id and date to compute daily page views per shop. Then, define a visibility metric that compares the average daily page views of shops created in the last 30 days versus older shops, ensuring to account for shop age and activity. Finally, calculate the metric using SQL and interpret whether newer shops have higher visibility.

Pro tip: When comparing new vs. old shops, control for shop size or category to avoid confounding; also consider using a normalized metric like page views per day since creation to better capture visibility trends.

1. Understand the tables and define daily page views

Identify the relevant columns: shops (shop_id, created_at) and page_views (shop_id, view_date, view_count). Write a SQL query to aggregate page views per shop per day.

2. Compute daily page views per shop

Use a GROUP BY on shop_id and view_date to sum view_count, resulting in a table with shop_id, date, and daily_views.

3. Define the visibility metric

Propose a metric such as average daily page views per shop, segmented by shop age (new: created within last 30 days; old: created earlier). Ensure the metric is comparable, e.g., by normalizing for shop age or using a fixed observation window.

4. Calculate the metric with SQL

Join the daily page views with shops, compute the average daily views for new and old shops, and compare them (e.g., ratio or difference). Use a CASE statement to classify shops by age.

5. Interpret and validate results

Discuss whether the metric shows a significant difference, consider potential biases (e.g., seasonality, shop size), and suggest ways to validate or refine the metric.

Key Points to Mention

  • SQL aggregation with GROUP BY and JOIN to compute daily page views per shop.
  • Definition of 'new' vs. 'old' shops based on created_at relative to current date.
  • Choice of visibility metric: average daily page views, possibly normalized by shop age or total views.
  • Handling of shops with zero page views (e.g., using LEFT JOIN or COALESCE).
  • Consideration of confounding factors like shop category, size, or marketing spend.
  • Statistical significance or effect size when comparing the two groups.

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