20 Meta Data Scientist Interview Questions

The SQL screen cuts more Meta candidates than any other round. Twenty questions from squizzu's SQL set, five playable here with full explanations.

10 min read

Most Meta data scientist interview questions are SQL questions, and the loop is not a machine learning loop. Product Analytics interviews open with a technical screen that pairs SQL with a short product question, and SQL comes back again during the on-site, alongside the analytical execution and analytical reasoning rounds. Candidates who prepare for it like an ML interview arrive with the wrong material.

The screen is also where the process narrows fastest. The syntax involved is ordinary, which is exactly why it separates people. An interviewer asks for daily active users, or retention, or the single most recent event per user, then keeps changing the data until the query breaks. A user with no events. A NULL in the column you filtered on. Two rows tied for first place.

The 20 questions below come from the SQL set in squizzu's question bank, picked for those shapes. Five of them are playable right here. Answer first, then read the explanation, because the gap between recognising a construct and producing it under time pressure is the whole subject.

Try 5 of them right now

No sign-up, no email. Each question gives you the reasoning and a deeper breakdown of why the other options fail, which is usually what the follow-up question is about.

Squizzu Logo
SQL • Window Functions

Question 1 / 5

On a leaderboard ordered by score descending, two players are tied for first place. Using RANK() OVER (ORDER BY score DESC), what rank does the very next player - the one with the third-highest score - receive?

Three of those five turn on what SQL does with NULL and with ties, not on syntax you could have forgotten. That is the shape of the screen: nothing exotic, everything edge case.

The other 15 questions

The rest of the set, grouped the way the screen tends to move: aggregation and GROUP BY, then NULL handling, then joins, then window functions, then queries that combine several steps or several tables. Read them as a checklist. If you cannot write the query in a minute and say what happens when a value is missing, that is your revision list.

  1. If you run the query SELECT department, COUNT(*) FROM employees without a GROUP BY clause, will it execute successfully in standard SQL?SQL • Aggregation & Grouping
  2. If you want to filter rows before grouping and also filter groups after aggregation, do you need to use both the WHERE and HAVING clauses?SQL • Aggregation & Grouping
  3. How do aggregate functions such as SUM() and AVG() treat NULL values in SQL calculations?SQL • Aggregation & Grouping
  4. Can you use an aggregate function inside another aggregate function, such as SUM(COUNT(*))?SQL • Aggregation & Grouping
  5. What is the correct way to check whether a column contains a NULL value in SQL?SQL • Filtering & Conditions
  6. An organisational report must list every department alongside its employees, and crucially, departments that currently have no employees must still appear in the output (with empty employee columns). Given departments(id, name) and employees(id, dept_id, name), which join guarantees that empty departments are not dropped?SQL • Joins & Relationships
  7. Marketing wants the customers who have purchased BOTH product 100 AND product 200 - not customers who bought either one, but those who bought both. Purchases are recorded in order_items(order_id, product_id) linked to orders(id, customer_id). Which approach correctly identifies these customers?SQL • Joins & Relationships
  8. Two tables are joined on a region_code column that is nullable in both. A developer expects rows where region_code IS NULL on both sides to match each other, but the equi-join (ON a.region_code = b.region_code) silently drops every one of those NULL-coded rows. Why, and what construct matches NULL to NULL?SQL • Joins & Relationships
  9. An HR system stores staff in a single employees table where each row has an id and a manager_id that references the id of another row in the same table. You must produce a list showing each employee's name next to their manager's name, including the CEO, whose manager_id is NULL. Which technique fits this requirement?SQL • Joins & Relationships
  10. For each support ticket, you want to show how many days pass until that same customer's NEXT ticket, with NULL for each customer's most recent ticket. Given tickets(customer_id, created_at), which window function retrieves the following ticket's date within each customer?SQL • Window Functions
  11. For each product category, you must return the two highest-priced products (so several rows per category, not one). Using window functions, what is the correct overall structure?SQL • Window Functions
  12. You need a 3-day trailing moving average of daily sales: each day's value should be the average of that day and the two days before it. Given daily_sales(day, amount), which window frame produces this trailing moving average?SQL • Window Functions
  13. A running total SUM(amount) OVER (ORDER BY day) is meant to accumulate transaction by transaction, but two transactions that fall on the same day both show the same cumulative value (the total including both) instead of stepping up one at a time. Why, and what changes it?SQL • Window Functions
  14. An analytics task has three sequential steps: first compute monthly revenue per region, then rank regions within each month by that revenue, then keep only the top-ranked region for each month. Which structure expresses this multi-step pipeline most readably?SQL • Subqueries & CTEs
  15. Sales are split between a current_sales table and an archived_sales table, both with (product, revenue). You need total revenue per product across both tables. What is the correct approach?SQL • Set Operations

The five SQL answers, written out

Two players tie for first. What rank does the next player get?

Short answer: 3, because RANK() leaves a gap after a tie.

Explanation: RANK(), DENSE_RANK() and ROW_NUMBER() differ only in how they treat rows with equal values in the window's ORDER BY. RANK() gives tied rows the same number and then resumes after the positions the tie consumed, so two players at 1 push the next distinct score to 3. DENSE_RANK() would say 2. ROW_NUMBER() refuses to acknowledge the tie at all and hands out 1, 2, 3 in an order you did not specify.

What the interviewer is testing: whether your "top N per group" query is correct when the data contains ties, which production data always does. Pick the wrong function and a leaderboard silently gains or loses rows.

Common follow-up: "You want exactly three rows even when there is a tie for third. Which function, and what breaks?" (ROW_NUMBER(), and what breaks is determinism: add a tiebreaker column to the ORDER BY or the same query returns different rows on different runs.)

A LEFT JOIN report lost every customer who never ordered. Why?

Short answer: the WHERE clause filtered a column from the right table, which is NULL for exactly those customers.

Explanation: the join step runs first and does its job, emitting one row per customer, with the order columns set to NULL where there was no match. The WHERE clause is applied to that intermediate result. A test such as o.status = 'shipped' against a NULL yields UNKNOWN rather than TRUE, and a row survives WHERE only when the predicate is TRUE, so every unmatched customer disappears. The join was still an outer join; the filter converted the result into an inner one. Moving the condition into the ON clause, or allowing o.status IS NULL, keeps them.

What the interviewer is testing: whether you know the order in which a query is logically processed. Almost every wrong metric produced by an analyst traces back to a filter applied at the wrong stage.

Common follow-up: "Where would you put a date restriction on the orders, and does the answer change if you want customers with no orders in that window to appear as zero?"

NOT IN returned nothing after one new row was inserted

Short answer: a NULL appeared in the subquery's list, so the predicate became UNKNOWN for every row.

Explanation: x NOT IN (a, b, c) expands to x <> a AND x <> b AND x <> c. A comparison against NULL is UNKNOWN, not FALSE, and one UNKNOWN drags the whole conjunction to UNKNOWN, which WHERE then discards. A single employee with no manager was enough to empty the report. NOT EXISTS is unaffected, which is why it is the habit worth building; excluding NULLs inside the subquery also works.

What the interviewer is testing: three-valued logic, and whether you treat an empty result as suspicious rather than as an answer. An analyst who ships "zero users matched" without checking is the risk the question screens for.

Common follow-up: "Same query with NOT EXISTS. Walk me through why the NULL no longer matters."

How do you compute a median per group in SQL?

Short answer: PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY value), grouped by region.

Explanation: the median is the 50th percentile, and standard SQL computes percentiles with an ordered-set aggregate rather than with a plain aggregate function. There is no portable MEDIAN(). The same call gives any percentile by changing the fraction, which matters in practice because the interesting question about a revenue or latency distribution is usually the 90th, not the middle.

What the interviewer is testing: whether you reach for the mean by reflex. Engagement and spend distributions at Meta scale are heavily skewed, so a mean session length or a mean revenue per user can move for reasons that have nothing to do with the typical user.

Common follow-up: "Average time spent went up 4% and the median did not move. What happened?"

Why is a subquery in the SELECT list slow, and what replaces it?

Short answer: aggregate the child table once, then LEFT JOIN the totals in.

Explanation: a correlated subquery in the SELECT list is, in the naive plan, evaluated once per outer row, so a customer list of millions means millions of separate counts. Computing every count in one grouped pass and attaching the result turns that into two scans. COALESCE restores the zeros for customers the aggregate produced no row for, which is the detail people drop.

What the interviewer is testing: whether you can reason about the work a query does, not just its output. At Meta the tables are large enough that a query which is merely correct is not yet an answer.

Common follow-up: "Would a window function do the same job here?"

What a Meta data scientist interview actually tests

The rounds have distinct jobs, and preparing for one does not prepare you for another.

  • Technical screen. SQL, plus a short product question. This is a filter, and the SQL half is where people fail.
  • Analytical execution. You are given a scenario with data and asked to design the measurement: which metric, which cut, what you would query. Statistics and experiment design live here.
  • Analytical reasoning. A metric moved. Find out why, propose what to do. There is no dataset and no right answer, only the structure of your investigation.
  • Technical SQL. Longer and harder than the screen, with follow-ups about scale and correctness.
  • Behavioural. Conflict, collaboration, and projects you actually owned.

Statistics and A/B testing questions

Questions here are applied rather than derived. Nobody asks you to prove anything; they ask what you would conclude and what you would do next.

Hypothesis testing in plain language. What a p-value is, and specifically what it is not. It is the probability of data at least this extreme assuming the null hypothesis holds, not the probability that your hypothesis is true. Type I and Type II error come up constantly, usually phrased as a product decision: which error is more expensive when the feature ships to two billion people?

Testing many things at once. A dashboard of thirty metrics tested at the 5% level produces false positives by construction. Knowing that a correction exists is the minimum; being able to say why you would rather nominate one primary metric in advance is the answer that lands.

Effects that are not the effect you wanted. A novelty bump in the first days of an experiment, which decays. Network effects, where the treatment leaks into the control because the users are connected to each other, which is a live problem at a social company rather than a textbook aside.

Counter-metrics. Every metric proposal should arrive with the metric that would catch you gaming it. If engagement is the target, the counter-metric is the one that notices when engagement rose because the product got noisier.

Meta product sense questions, in three shapes

The product rounds reuse a small number of question shapes, and recognising which one you are in is most of the work.

Define a metric. "How would you measure whether the Events feature is working?" A good answer names the user behaviour first, then the metric that approximates it, then what the metric misses.

Diagnose a move. "Engagement dropped 3% week over week. Go." Split by platform, country, cohort and release, and separate the boring explanations from the interesting ones before theorising. Instrumentation broke more often than user behaviour changed.

Decide a trade-off. "A change raises daily active users by 2% and lowers time spent by 3%. Do you ship it?" The answer is not yes or no. It is which of the two is closer to the value the product is supposed to create, what you would measure to break the tie, and how long you would wait before believing either number.

How to answer a Meta SQL question out loud

The screen is scored on reasoning as much as on the final query, and silence reads as uncertainty. Four beats work for almost every question:

  1. Restate the grain. "One row per user per day, and a user with no activity should still appear." Half of all wrong answers are wrong about this, not about SQL.
  2. Name the shape. "This is a top-N per group, so a ranking window function inside a subquery, filtered in the outer query."
  3. Write it, then attack it. Say out loud what happens with a NULL, a tie, a duplicate, an empty table.
  4. Say what you would change at scale. Which column you would want indexed, which step scans the most rows.

What to do next

Reading questions is not answering them. The five above gave you the feedback loop: you committed before you saw the explanation, which is the only way to tell knowledge from familiarity.

Answer the remaining 15 in quiz mode on squizzu — same format, with an explanation and an in-depth breakdown on every question, plus the rest of the SQL set to keep going.

If your target is the ML side of the loop rather than Product Analytics, 20 Google AI/ML interview questions covers the fundamentals those rounds test, with its own five-question self-check.

Still at the application stage? How to write an AI/ML resume in 2026 covers what to state explicitly so a screening model can match it.

Frequently asked questions

What does the Meta data scientist interview process look like?

A recruiter call, then a technical screen of roughly 45 minutes that pairs SQL with a short product question, then a virtual on-site of four to five 45-minute rounds: analytical execution, analytical reasoning, a technical SQL round, and behavioural. Candidates typically describe the whole thing as taking four to six weeks. Product Analytics roles are not model-building roles, so deep learning and PyTorch are not what the loop examines.

How hard is the SQL in a Meta data scientist interview?

The syntax is ordinary and the logic is not. Interviewers ask for things like daily active users, retention between two periods, or the top item per group, then keep asking what happens when the data is messier than the example: a user with no events, a NULL in the column you filtered on, two rows tied for first place. Speed matters less than a query whose output survives those cases.

What SQL topics come up most in analytics interviews?

Five groups cover almost everything: aggregation with GROUP BY, including what WHERE can filter and what only HAVING can; joins, especially outer joins and the ways they collapse back into inner joins; NULL semantics, which is where most silently wrong answers come from; window functions for ranking, lag and lead, moving averages and percentiles; and CTEs for multi-step pipelines. Set operations sit just behind them.

Why does a LEFT JOIN sometimes drop rows?

Because of a filter written in the wrong clause. A LEFT JOIN keeps unmatched left rows and fills the right table's columns with NULL. If the WHERE clause then tests one of those NULL columns, the comparison evaluates to UNKNOWN rather than TRUE, the row is discarded, and the query behaves like an INNER JOIN. Moving the condition into the ON clause keeps the unmatched rows.

What statistics questions does Meta ask data scientists?

Hypothesis testing in applied form rather than derivations: what a p-value is and is not, Type I versus Type II error, how to correct when you test many metrics at once, and how to recognise a novelty effect in the first days of an experiment. Probability questions appear too, usually as a short product scenario such as the chance that a viewer finishes every story in a sequence.

How long should I prepare for a Meta data scientist interview?

Two to four weeks is realistic if you write SQL regularly and the gap is interview form rather than knowledge. Spend the first week on the query shapes the screen reuses, the second on experiment design and metric definition, and whatever is left on saying your reasoning out loud, which is the part candidates practise least and the interviewer scores continuously.

We use cookies

Some cookies are needed to run this site. With your consent we also measure how it is used, so that we can improve it.

Cookie policy

Choose what we may measure. You can change this at any time.

Strictly necessary

Essential for the proper functioning of the website. These cannot be disabled.

Performance and analytics

Help us understand how Squizzu is used, diagnose technical issues and improve the service.

20 Meta Data Scientist Interview Questions | Squizzu