Data Analyst Interview Guide with SQL and Case Questions
How the data analyst interview works, the SQL, metrics and experiment skills it scores, 8 practice questions with strong answers, and a 7-day prep plan.
Updated

A data analyst interview tests whether people can trust your numbers and act on them: whether your SQL counts the right things once, you can explain why a metric moved, you read an experiment result honestly, and you can say no to a misleading chart without losing the stakeholder. Expect SQL questions you reason through out loud, metric definitions, a conversion drop, an A/B test result, a data-quality problem, a queue of competing requests and behavioural questions about mistakes and decisions you changed.
What the job really is#
A data analyst turns raw data into answers someone can use: a dashboard that is right, a metric everyone defines the same way, an explanation of why something moved and a recommendation with an honest range around it. Most of the day is SQL against a warehouse, conversations to pin down what the question really is, and writing or presenting the answer.
The best analysts check their own numbers before anyone else does, notice when two teams use the same word for different things, and keep an executive's question, not the query, at the centre of the work.
Our practice interviews are set at Hearthcrate, a fictional meal-kit subscription business that delivers weekly recipe boxes to about 205,000 subscribers in the US and the UK. New customers start with a two-week half-price trial, subscribers can skip, pause or cancel, and experiments run on an in-house platform that randomises by user. The interviewer is Desmond, the analytics manager.
What the data analyst interview process looks like#
A typical loop runs:
- A recruiter screen on your experience, tools and the kinds of questions you have answered.
- A technical screen: SQL, live or as a take-home, sometimes with a spreadsheet or statistics task.
- A final round: an analysis or metrics case, a review of a take-home, a stakeholder or behavioural interview, and time for your questions.
Our practice papers condense that into one session with an AI voice interviewer, and some scenarios put a short table on your screen to talk through. In the 45 and 60-minute papers you also write and run SQL against a small PostgreSQL database, in two parts.
- 30 minutes: introductions (2), SQL reasoning (5), a conversion drop (10), an A/B test result (6), owning your analysis (4), your questions (2), wrap-up (1).
- 45 minutes: introductions (3), owning your analysis (4), live SQL in two parts (18), an A/B test result (8), a data-quality problem (8), your questions (3), wrap-up (1).
- 60 minutes: introductions (3), defining churn (6), live SQL in two parts (20), prioritising requests (6), measuring a feature (7), a number for the board (7), changing a decision (6), your questions (4), wrap-up (1).
See how the practice interviews work.
Skills scored and how they are weighted#
Each skill is rated Not yet, Developing, Hire-ready or Standout, with quotes from what you said as evidence. SQL is the must-have: it needs Hire-ready for an overall yes.
- SQL (must-have, 25%): correct queries with joins, aggregates and window functions, and checking the results.
- Coding (10%): SQL that runs and passes hidden tests, in the 45 and 60-minute papers.
- Statistics and experimentation (15%): a sound test or analysis, assumptions checked and uncertainty explained plainly.
- Execution and metrics (15%): choosing metrics with guardrails and diagnosing a change systematically.
- Communication (10%): clear answers that fit the listener.
- Data wrangling (15%): cleaning, deduplicating and reconciling data with clear rules.
- Problem decomposition (10%): turning a vague request into a precise question before writing any SQL.
Data analyst interview questions to practise#
We wrote these for this guide. They show the style of each round, not the content of any paper.
SQL#
- What's the difference between WHERE and HAVING? A strong answer says WHERE filters rows before they are grouped and HAVING filters groups after aggregation, so "customers with more than three orders" needs HAVING on the count, and it adds that filtering rows early with WHERE is usually cheaper.
- How would you calculate a seven-day rolling average of daily orders, including days with no orders? A strong answer builds a calendar of every date, left joins the daily counts to it with missing days set to zero, then averages over the current row and the six before it with a window function. It explains that without the calendar, quiet days would vanish and the "seven days" would stretch further back.
Metrics and analysis#
- A manager asks for "the number of active users". What do you ask before writing any SQL? A strong answer pins down what counts as active (a login, an order, any event), over what window, for which platforms and regions, which accounts to exclude (staff, test and fraud), which time zone, and what decision the number is for, then writes the definition down so the next request uses the same one.
- How would you build a cohort retention chart, and what would you look for? A strong answer groups customers by the month they started, defines what retained means, and shows the share of each cohort still retained in each later month. It looks for where the curves flatten, whether newer cohorts retain better or worse, and seasonality, and it greys out recent cohorts that haven't had time to mature.
- How do you tell whether a week-on-week change in a metric is real or just noise? A strong answer compares the change with the metric's normal week-to-week variation, checks for seasonality and holidays, looks at whether the change appears consistently across segments, and puts a range on it before calling it a trend.
Experiments#
- Before an A/B test starts, what would you want agreed? A strong answer asks for the hypothesis, one primary metric with guardrails, the unit of randomisation, the sample size and duration from a power calculation (in whole weeks), and what decision each result will lead to. It adds that the team shouldn't stop the test early on a promising day without a method designed for that.
Communication#
- How do you write up an analysis so a busy executive acts on it? A strong answer leads with the answer and the recommendation, gives the key number with its uncertainty, shows one chart that makes the point, says what would change the conclusion, and moves the method into an appendix.
Behavioural#
- Tell me about a time you automated a report people used to build by hand. A strong answer describes the old process and its cost in hours or errors, what the candidate built, how they checked the new numbers matched the old, and what the team did with the time saved.
How the SQL round works#
Whether you type a query or talk it through, interviewers listen for structure as much as syntax. How to answer:
- Say what one row of each table stands for before you join anything, and what one row of your result should be.
- Say which join you are using and why, and what happens to rows with no match.
- Aggregate at the right level, and say how you would avoid counting anything twice.
- Mention NULLs, time zones and currencies when they could change the answer.
- Say how you would check the result: row counts, totals compared with a trusted source, a few records traced by hand.
In the scenario rounds, start from the decision, check the data before explaining it, break the metric into segments and steps, put a range on the answer and finish with a recommendation. In the stakeholder role-play, take their goal seriously and offer an honest version of what they need.
Common mistakes#
- Writing SQL before agreeing what the metric means.
- Reporting a number without checking it against another source.
- Treating statistical significance as proof that a change is worth shipping.
- Working requests in the order they arrived instead of by what they are worth.
- Hiding the caveats, or burying the answer under them.
A one-week prep plan#
- Day 1: revise SQL fundamentals out loud: joins and grain, GROUP BY and HAVING, CASE, NULL handling and date functions.
- Day 2: revise window functions: ROW_NUMBER, running totals, rolling averages and LAG.
- Day 3: define conversion, retention and churn precisely, then practise diagnosing a metric change by segment and funnel step.
- Day 4: take the 30-minute practice paper and read the quotes on your scorecard.
- Day 5: revise experiments: hypothesis tests, confidence intervals, power, sample ratio mismatch and peeking.
- Day 6: prepare four stories: a mistake in shared analysis, an analysis that changed a decision, a request you pushed back on and a messy dataset you cleaned.
- Day 7: take the 60-minute paper end to end.
When you are ready, practise the Data Analyst interview and get scored on SQL, statistics and the rest of the skills above.
Frequently asked questions#
What questions are asked in a data analyst interview?#
Expect SQL questions on joins, aggregation and window functions, metric definitions such as conversion and churn, a case about why a number moved, questions on reading an A/B test, and behavioural questions about stakeholders and mistakes. Many companies also give a take-home analysis or a live SQL exercise.
How much SQL do I need for a data analyst interview?#
You should be comfortable with joins, GROUP BY and HAVING, CASE, subqueries or CTEs, and window functions such as ROW_NUMBER and running totals, and you should be able to explain why your query is correct. Interviewers care as much about checking grain and avoiding double counting as about syntax.
How is a data analyst interview different from a data scientist interview?#
Analyst interviews focus on SQL, metrics, dashboards and clear explanations of what happened, with some experimentation. Data scientist interviews go deeper into statistics, experiment design and often Python. Our data scientist interview guide covers that loop.
How should I prepare for a data analyst interview?#
Practise SQL out loud on joins and window functions, define the common subscription and product metrics precisely, and work through two metric-diagnosis cases. Prepare stories about a mistake you caught and an analysis that changed a decision. Finish with a timed mock interview.
How long are the practice interviews?#
There are three papers, of 30, 45 and 60 minutes, each run by an AI voice interviewer. All include SQL: talked through in the 30-minute paper, and written and run in PostgreSQL in the 45 and 60-minute papers. Around it come a conversion drop, an A/B test, churn, data quality, prioritising requests, measuring a feature and a stakeholder role-play. You can start a Data Analyst practice interview at any of the three lengths.