Data analyst interviews usually combine three things: a technical check (SQL, Excel, sometimes Python), a business case where you reason through a problem with data, and behavioral questions about projects you've done. Interviewers want to see that you can get the right numbers, explain what they mean, and help someone make a decision. Below are 30 data analyst interview questions with sample answers and worked SQL examples.
What interviewers look for
| Area | What they want to see |
|---|---|
| SQL and tools | Correct, readable queries; comfort with joins and aggregations |
| Data quality | You check for problems before trusting a number |
| Business sense | You connect analysis to a decision |
| Communication | You explain results simply, to non-technical people |
| Curiosity | You ask "why" and dig into the data |
SQL questions
These examples use two tables:
- orders(order_id, customer_id, order_date, amount)
- customers(customer_id, name, signup_date)
1. Find the top two customers by total revenue
SELECT customer_id, SUM(amount) AS revenue
FROM orders
GROUP BY customer_id
ORDER BY revenue DESC
LIMIT 2;
2. Find customers who have never placed an order
SELECT c.customer_id, c.name
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.customer_id
WHERE o.order_id IS NULL;
Explain why a LEFT JOIN with IS NULL works: it keeps every customer and leaves order columns empty where there's no match.
3. Find each customer's second-largest order
SELECT customer_id, order_id, amount
FROM (
SELECT customer_id, order_id, amount,
ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY amount DESC) AS rn
FROM orders
) ranked
WHERE rn = 2;
Mention the difference between ROW_NUMBER, RANK and DENSE_RANK when there are ties.
4. Calculate monthly revenue
SELECT DATE_TRUNC('month', order_date) AS month, SUM(amount) AS revenue
FROM orders
GROUP BY 1
ORDER BY 1;
DATE_TRUNC is PostgreSQL syntax; in SQLite you'd use strftime('%Y-%m', order_date), and other databases have their own functions. Say which dialect you're using.
5. What's the difference between WHERE and HAVING?
WHERE filters rows before grouping; HAVING filters groups after aggregation.
6. What are the types of joins?
Inner, left, right and full outer; explain when you'd use each and what happens to unmatched rows.
7. How would you find duplicate records?
Group by the columns that should be unique and filter with HAVING COUNT(*) > 1.
8. What is a window function, and when would you use one?
A calculation across related rows without collapsing them, such as running totals, rankings or comparing each row with the previous one.
Excel and spreadsheets
9. What's the difference between VLOOKUP and XLOOKUP (or INDEX/MATCH)?
XLOOKUP and INDEX/MATCH can look left, handle missing values more flexibly, and don't break when columns move.
10. How do you use pivot tables?
To summarize data by categories quickly, such as revenue by region and month.
11. How would you clean a messy spreadsheet?
Remove duplicates, standardize formats (dates, text case), handle blanks, and check outliers.
Statistics
12. What's the difference between mean and median, and when would you use each?
Median is better when data is skewed, such as income or order value.
13. What is a p-value?
The probability of seeing a result at least as extreme as the one observed if there were really no effect. A small p-value suggests the result is unlikely to be chance alone, but it doesn't tell you how big or important the effect is.
14. What's the difference between correlation and causation?
Two variables moving together doesn't mean one causes the other; a third factor or chance may explain it. Experiments help establish causation.
15. How would you design an A/B test?
Define the metric and hypothesis, decide sample size, randomize users, run for a fixed period, and check significance and practical impact.
16. What is an outlier, and what do you do with one?
Investigate before removing; it may be an error or a real, important case.
Data cleaning and quality
17. How do you handle missing data?
Find out why it's missing, then decide: remove, fill with a reasonable value, or flag it. Explain the effect on results.
18. How do you check whether a dataset is reliable?
Row counts against the source, totals that reconcile, date ranges, duplicates, and spot checks.
19. Tell me about a time you found an error in data
A short STAR story with what you did to fix it at the source.
Visualization and dashboards
20. How do you choose the right chart?
Line for trends over time, bar for comparing categories, scatter for relationships; avoid pie charts with many slices.
21. How do you design a dashboard for executives?
A few key metrics at the top, trends, clear labels, and filters only where needed.
22. Which BI tools have you used?
Name them and a dashboard you built. See our Power BI interview questions.
Business case questions
23. Sign-ups dropped 20% last week. How would you investigate?
"First I'd confirm the drop is real by checking tracking and data loading. Then I'd compare by platform, country, traffic source and sign-up step to see where it happened. If it's one channel or one step, I'd check for changes there, such as a campaign ending or a site release. I'd share what I found and what we still don't know."
24. How would you measure the success of a new feature?
Define the goal, choose a primary metric and guardrail metrics, and compare with a control group or a before-and-after period.
25. What metrics would you track for an online store?
Traffic, conversion rate, average order value, repeat purchase rate, and customer acquisition cost.
26. How would you explain a complex finding to a non-technical manager?
Lead with the conclusion and its impact, use one simple chart, and keep the method brief.
Behavioral questions
27. Tell me about an analysis that changed a decision
The question, the data, what you found, and what changed.
28. Describe a time you had to work with incomplete data
What assumptions you made and how you communicated them.
29. How do you prioritize requests from several stakeholders?
Business impact and urgency, agreed with the stakeholders or your manager.
30. Tell me about a time your analysis was wrong
Own it, fix it, and explain what you now check.
For structuring these stories, see our STAR method guide.
Prepare one strong portfolio project
| Part | What to include |
|---|---|
| Question | A clear business question |
| Data | Source, size, and how you cleaned it |
| Method | SQL, spreadsheet or Python steps |
| Finding | One or two clear results with a chart |
| Decision | What someone should do based on it |
How to prepare
- Practice SQL daily for two weeks: joins, aggregation and window functions.
- Review basic statistics: averages, distributions, A/B tests, p-values.
- Prepare one portfolio project and three STAR stories.
- Practice a "why did this metric change" case aloud.
- Research the company's product and the metrics it likely cares about.
For related roles, see business analyst interview questions and Python interview questions. If you want tools to help you prepare, our roundup of AI tools for data analyst interviews compares the options.
Practice SQL explanations and case answers
Rehearse technical and case questions out loud with YesToTheOffer, using your resume and the job description, and review your transcript. 30 free minutes, no subscription.



