← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Senior

Senior
Jul 2026

Summary

SQL-heavy technical screen for a DS role on an ads platform. Two questions, both multi-part, both requiring you to actually think about the data model rather than just write a join and call it a day. Left feeling okay about Q1 but Q2 had a wrinkle that tripped me up a bit.

Questions Asked (2)

Q1

Given an ads platform schema with advertisers, ads, and daily spend tables, identify advertisers whose total 2023 spend exceeded $1,000. Then, for that cohort, calculate what percentage of total 2024 platform spend came from them. Return the eligible advertiser count, cohort 2024 spend, total 2024 platform spend, and the cohort share.

Product Analytics & MetricsData Modeling
Author's notes

The cohort definition part is pretty clean, just a subquery or CTE filtering on 2023 spend.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Break the problem into two stages: first, aggregate 2023 spend per advertiser to identify those exceeding $1,000; second, compute the cohort's 2024 spend and the platform's total 2024 spend, then calculate the share. Use a subquery or CTE to filter the cohort, and ensure you handle edge cases like advertisers with no 2024 spend.

Pro tip: Clarify whether 'total 2023 spend' means calendar year or trailing twelve months, and confirm that 'platform spend' refers to the sum of daily spend across all advertisers. Also, consider if spend is in dollars or another currency.

1. Identify eligible advertisers

Aggregate the daily spend table for 2023 by advertiser, summing spend, and filter for advertisers with total spend > $1,000.

2. Compute cohort 2024 spend

For the eligible advertisers, sum their 2024 spend from the daily spend table.

3. Compute total 2024 platform spend

Sum all 2024 spend from the daily spend table across all advertisers.

4. Calculate share and count

Divide cohort 2024 spend by total 2024 platform spend to get the percentage, and count the number of eligible advertisers.

Key Points to Mention

  • Use of CTEs or subqueries to modularize the query and improve readability.
  • Handling of date ranges: ensure 2023 and 2024 are full calendar years, and consider time zones if applicable.
  • Edge cases: advertisers with no 2024 spend, null values, or negative spend (refunds).
  • Definition of 'total spend': sum of daily spend, possibly excluding non-billable or fraudulent spend.
  • Performance considerations: indexing on date and advertiser_id, and avoiding full table scans.
  • Interpretation of results: what the cohort share indicates about advertiser concentration and platform revenue dependency.

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

Q2

Write a query returning monthly 2024 spend broken down by ad creation source, excluding certain advertiser types. Also include, within each month, the spend from advertisers where AI-assisted ad spend went up year-over-year while their manual ad spend went down, to surface potential cannibalization between creation sources.

Product Analytics & MetricsRoot Cause AnalysisData Modeling
Author's notes

This one is messier than it looks.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and definitions (ad creation source, advertiser types to exclude, AI-assisted vs manual spend, YoY comparison). Then outline a query structure using CTEs: one for monthly spend by source with exclusions, and another for the cannibalization subset, joined or unioned appropriately. Finally, discuss validation and potential pitfalls like time zone, currency, and data completeness.

Pro tip: Mention that you would first check data quality and define 'AI-assisted' precisely (e.g., based on a flag or model), and consider using a window function to compute YoY changes within the same query for efficiency.

1. Clarify requirements and definitions

Ask clarifying questions about the schema, what constitutes 'ad creation source', which advertiser types to exclude, and how AI-assisted vs manual spend is identified. Confirm the exact YoY comparison (e.g., 2024 vs 2023).

2. Design the base aggregation

Write a CTE to aggregate monthly spend for 2024 by ad creation source, filtering out excluded advertiser types. Ensure proper date truncation to month and grouping by source.

3. Identify cannibalization subset

Create a second CTE that calculates year-over-year change in AI-assisted and manual spend per advertiser, then filter to advertisers where AI-assisted spend increased and manual spend decreased. Aggregate their monthly 2024 spend by source.

4. Combine and present results

Join or union the base aggregation with the cannibalization subset, ensuring each month includes both total spend by source and the subset spend. Use appropriate labels to distinguish the two.

5. Validate and discuss edge cases

Check for data completeness, time zone consistency, and currency conversion. Discuss how to handle advertisers with no prior year data or missing source information.

Key Points to Mention

  • Use of CTEs for readability and modularity
  • Window functions (e.g., LAG) to compute YoY changes efficiently
  • Proper date filtering and truncation (e.g., DATE_TRUNC('month', date))
  • Handling of NULLs and excluded advertiser types
  • Definition of AI-assisted vs manual ad spend (e.g., based on a flag or model)
  • Potential cannibalization interpretation and business implications

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