← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Meta data scientist SQL round, two-part question on marketplace interactions. Pretty standard stuff but the second part tripped me up more than I expected.

Questions Asked (2)

Q1

Given a table of buyer-seller listing interactions, how would you find the number of distinct sellers who, in the last 3 calendar days, have more than 3 products each with a listing interaction count greater than 1?

Product Analytics & MetricsData Modeling
Author's notes

Felt pretty comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and definitions (e.g., what constitutes a listing interaction, how to handle time zones). Then outline a SQL query that filters interactions to the last 3 calendar days, aggregates counts per seller-product, filters products with count > 1, and finally counts distinct sellers with more than 3 such products.

Pro tip: Mention that you would validate the query with edge cases (e.g., sellers with exactly 3 products, interactions on the boundary of the 3-day window) and consider performance implications for large datasets.

1. Clarify requirements and schema

Ask questions to confirm the table structure, definitions of 'listing interaction', 'product', and 'seller', and how to handle time zones and calendar days.

2. Filter interactions to last 3 calendar days

Use a date filter (e.g., WHERE interaction_date >= CURRENT_DATE - INTERVAL '3 days') to restrict the dataset to the relevant time window.

3. Aggregate interactions per seller-product

Group by seller_id and product_id, and count interactions to get the interaction count for each seller-product pair.

4. Filter products with count > 1

Apply a HAVING clause to keep only seller-product pairs where the interaction count exceeds 1.

5. Count distinct sellers with >3 such products

Group by seller_id, count the number of qualifying products, filter for counts >3, and then count distinct sellers.

Key Points to Mention

  • Use of DISTINCT COUNT for sellers
  • Proper date filtering for 'last 3 calendar days' (considering time zones and inclusive/exclusive boundaries)
  • Aggregation with GROUP BY and HAVING clauses
  • Handling of potential NULLs or duplicates in the data
  • Performance considerations for large datasets (e.g., indexing, partitioning)
  • Validation with edge cases (e.g., sellers with exactly 3 products, interactions on the boundary)

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

Q2

Among listings created in the US within the last 7 days, what percentage of total listing interactions comes from the 'Vehicle' category?

Product Analytics & MetricsData Modeling
Author's notes

This one got me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the definitions of key terms: 'listings created in the US within the last 7 days', 'total listing interactions', and 'Vehicle category'. Then outline a SQL-based approach to join listings and interactions, filter by date and country, and compute the percentage of interactions from Vehicle listings. Finally, discuss potential data quality issues and validation steps.

Pro tip: Mention that you would validate the category assignment by checking if 'Vehicle' is a top-level category or a subcategory, and consider whether interactions on Vehicle listings might be skewed by high-ticket items or bots. This shows you think about data nuances beyond the surface.

1. Clarify Definitions

Confirm what constitutes a 'listing', 'interaction', and 'Vehicle category' (e.g., is it a top-level category or includes subcategories like cars, motorcycles?). Also clarify the time window: last 7 days from today or from a specific date?

2. Identify Data Sources

Determine which tables contain listings (with creation date, country, category) and interactions (with listing ID, interaction type, timestamp). Ensure you can join them on listing ID.

3. Write Query Logic

Filter listings created in the US in the last 7 days, join with interactions, then calculate the percentage: (interactions on Vehicle listings / total interactions on those listings) * 100. Use appropriate date functions and handle time zones.

4. Validate and Sanity Check

Check for missing data, duplicate interactions, or listings with no interactions. Compare with overall trends to see if the percentage seems reasonable. Consider edge cases like listings created near midnight.

5. Present and Interpret

Clearly state the percentage and provide context: e.g., 'Vehicle listings account for X% of interactions among new US listings in the last week.' Discuss potential business implications or next steps.

Key Points to Mention

  • Definition of 'interaction' (e.g., views, clicks, messages, favorites) and whether to count unique users or total events.
  • Time zone considerations for 'last 7 days' and 'US' (e.g., use UTC or local time? US includes multiple time zones).
  • Handling of listings with zero interactions and whether they should be included in the denominator.
  • Potential data quality issues: bots, duplicate listings, or misclassified categories.
  • Use of SQL window functions or subqueries to compute the percentage efficiently.
  • Business context: why this metric matters (e.g., to understand engagement with vehicle listings vs. other categories).

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