Data analyst interview questions: SQL, Excel, stats and sample answers
Data analyst interview questions on SQL, Excel, statistics, data cleaning, dashboards and stakeholders, with what good answers show and STAR sample answers.
Quick answer
Data analyst interviews test four things: whether you can get the right data out of a database with SQL, whether you can clean and check it, whether you reason soundly about numbers, and whether you can explain a finding so a non-technical manager acts on it. Expect a technical round, a case or take-home exercise and behavioral questions about real projects and stakeholders.
Key takeaways
- Most data analyst interviews mix a SQL or spreadsheet test, a case or take-home exercise and behavioral questions about real projects.
- In technical questions, say your assumptions out loud: how you treat nulls, duplicates and ties often matters more than the syntax.
- Prepare three or four true project stories with the STAR interview method, each ending in a decision someone made.
- Interviewers listen for whether you checked the data before trusting it and whether you can explain a finding without jargon.
What do data analyst interviews assess?
A data analyst turns raw data into answers someone can act on. Interviews are built around that chain: finding the right data, cleaning it, analyzing it correctly and communicating the result. Each round tends to test one link, and a strong candidate shows they can carry a question all the way to a recommendation.
The U.S. Bureau of Labor Statistics profile of data scientists, a closely related occupation in its Occupational Outlook Handbook, describes the same chain: determining which data are available and useful, cleaning raw data so software can read it, presenting findings with visualization software and making business recommendations to stakeholders. It lists analytical, computer, communication and problem-solving skills as important qualities, including conveying results to technical and nontechnical audiences. Analyst interviews probe those qualities directly.
Many employers also use structured interviews, where every candidate gets the same questions and is scored against benchmarks. The U.S. Office of Personnel Management even uses “Describe a situation where you analyzed and interpreted information” as its example of a behavioral question, which is close to the core of this job. Read the posting closely as part of your interview preparation: the tools it names (SQL dialect, Excel, Tableau, Power BI, Python or R) and the teams it mentions tell you which rounds to expect.
A typical process includes a recruiter screen, a technical screen with live SQL or spreadsheet questions, a case study or take-home exercise, and a final round with the hiring manager and stakeholders. Smaller teams may combine these into one or two conversations.
SQL and database questions (and what a good answer shows)
SQL questions are usually asked live, in a shared editor or on a whiteboard, against a small schema such as customers, orders and products. Interviewers care about correctness and reasoning more than memorized syntax. Before writing, restate the question, name the tables and keys you will use and say how you will handle nulls, duplicates and ties.
Window functions come up often because they separate analysts who can only aggregate from analysts who can compare rows. The PostgreSQL documentation explains the key idea: a window function calculates across a set of related rows, like an aggregate, but does not collapse them into a single output row, so each row keeps its identity. It also notes that window functions cannot be used in a WHERE clause, so filtering on a rank requires a subquery, a detail interviewers like to probe.
- “What is the difference between an inner join and a left join?” Shows you know a left join keeps every row from the left table and fills missing matches with nulls, and when each is the right choice.
- “Why did your row count go up after a join?” Shows you recognize a one-to-many relationship duplicating rows and know to check the grain of each table first.
- “What is the difference between WHERE and HAVING?” Shows you understand that WHERE filters rows before grouping and HAVING filters groups after aggregation.
- “Find the top three products by revenue in each category.” Shows you can rank within groups with a window function, filter in an outer query and explain how you handle ties.
- “Calculate each customer’s running total of spend over time.” Shows you can partition by customer and order by date inside a window rather than writing a self-join.
- “How would you find duplicate records in a table?” Shows you group by the columns that define a duplicate, count them and ask which record should survive.
- “How does COUNT(column) differ from COUNT of all rows?” Shows you know counting a column skips nulls, which quietly changes averages and rates.
- “A query that used to run in seconds now takes minutes. What do you check?” Shows practical habits: filtering early, selecting only needed columns, checking join keys and asking about indexes or partitions.
Question: “For each customer, show every order with a running total of what they have spent so far.” Spoken approach: “Each output row is one order, so I don’t want GROUP BY, which would collapse orders into one row per customer. I’ll use a window: sum the amount, partitioned by customer and ordered by order date. If two orders share a date, I’ll add the order ID to the ordering so the total is deterministic.” SELECT customer_id, order_id, order_date, amount, SUM(amount) OVER (PARTITION BY customer_id ORDER BY order_date, order_id) AS running_total FROM orders; Follow-up check: “I’d spot-check one customer by hand and confirm refunds are stored as negative amounts rather than in a separate table.”
Excel, statistics and data cleaning questions
Spreadsheet questions are common for business-facing analyst roles, and some employers hand you a workbook to work through on screen. Statistics questions are usually conceptual rather than mathematical: interviewers want to know you will not mislead anyone. Data cleaning questions test the judgment behind every analysis you will ever deliver.
- “When would you use XLOOKUP or INDEX-MATCH instead of VLOOKUP?” Shows you know lookup limitations, such as VLOOKUP only searching to the right and breaking when columns move.
- “How would you summarize 50,000 rows of sales by region and month?” Shows you reach for a pivot table, and that you check the source range and blanks before trusting the totals.
- “Mean or median for reporting typical order value?” Shows you check the distribution and prefer the median when a few very large orders skew the mean.
- “Sales and ad spend move together. Did the ads work?” Shows you separate correlation from causation and suggest seasonality, other campaigns or a controlled test as explanations to rule out.
- “Explain a p-value to a marketing manager.” Shows you can say plainly how surprising the result would be if there were no real effect, without overstating certainty.
- “How would you set up and read an A/B test?” Shows you decide the metric and sample size before launch, randomize properly and avoid stopping early when a result looks good.
- “You receive a file with missing values, inconsistent date formats and duplicate IDs. Walk me through it.” Shows a repeatable process: profile the data, decide rules with the data owner, document every change and keep the raw file untouched.
- “How do you handle outliers?” Shows you investigate before deleting, since an outlier may be an entry error or the most important record in the file.
Dashboard, stakeholder and behavioral questions
These questions decide many final rounds, because a technically correct analysis that nobody uses has no value to the business. Answer them with real stories, the way you would in any set of behavioral interview questions: one specific project, your own actions and an honest result.
- “Tell me about a dashboard you built. Who used it and what changed?” Shows you started from the decisions users needed to make, not from the available charts.
- “How do you decide which chart to use?” Shows you match the chart to the comparison: lines for trends, bars for categories and a table when exact values matter.
- “Describe a time you presented a finding to a non-technical audience.” Shows you led with the answer and the decision it supports, and kept method details for questions.
- “Tell me about a time your analysis contradicted what a stakeholder expected.” Shows you double-checked your work, shared the evidence respectfully and stayed open to context you lacked.
- “Describe a time you found an error in data or in your own report after sharing it.” Shows ownership, a fast correction to everyone who saw it and a check you added afterward.
- “A manager asks for ‘all the data on churn’ by Friday. What do you do?” Shows you clarify the decision behind the request and agree on a smaller, useful first deliverable.
- “Why data analysis, and why this company?” Shows genuine interest in the questions this business needs answered, linked to evidence from your own projects.
How do you approach a data analyst case study or take-home exercise?
Case questions give you a business problem, such as “Weekly sign-ups dropped this month. How would you investigate?”, and watch how you structure it. Take-home exercises give you a dataset and a deadline, then ask you to present results. Both are graded on reasoning and communication as much as on the final number, so make your thinking visible.
- Restate the business question and ask what decision the answer will inform, who the audience is and how much time is expected.
- Check the data before analyzing: row counts, date ranges, missing values, duplicates and whether the metric is defined the way you assume.
- For a metric drop, rule out data problems first, such as tracking changes or late-arriving records, then break the metric down by segment, channel, region and date.
- Form two or three hypotheses and test the most likely or most costly first, instead of slicing every column.
- Lead the write-up with the answer and a recommendation, then show the two or three charts that support it, then list assumptions and limitations.
- Keep your work reproducible: comment queries, separate raw and cleaned data, and note anything you would do with more time.
Question from the brief: Why did repeat purchases fall last quarter? Answer: The drop is concentrated in customers who first bought during the spring promotion; repeat rates for other customers were roughly flat. Recommendation: Review the promotion’s targeting before it runs again and test a follow-up offer for that group. Confidence and limits: Based on order data only; I could not see marketing email history, which might explain part of the gap. Next step with more time: Compare those customers’ first-order products with everyone else’s.
Three worked sample answers for data analyst interviews
The answers below are invented for illustration, including every number in them. They show structure and a useful level of detail; build yours from your own projects, coursework or volunteer work, and never claim a result you did not produce. The STAR method answer generator can help you turn rough notes from a real project into the same shape.
Question: “Describe a time you presented a finding to a non-technical audience.” Situation: At a regional retailer, store managers believed a new self-checkout layout was slowing customers down, and they wanted it removed. Task: My manager asked me to check the transaction data and present the answer at the monthly operations meeting. Action: I compared average checkout time per transaction in the six weeks before and after the change, split by store and time of day. The overall average had gone up, but the increase came almost entirely from two stores where staff had not been trained on the new layout. For the meeting I used one chart, two bars per store, and opened with the sentence “The layout is not the problem in most stores; training is.” I kept the method on a backup slide. Result: The managers agreed to run training in the two stores before deciding, and the layout stayed. I learned to lead with the decision, not the method.
Question: “Tell me about a time you found a problem in the data before it caused a bad decision.” Situation: In my internship with a subscription software company, I was asked to update the monthly churn report, which showed churn nearly doubling in one month. Task: The report went to the leadership team, so I needed to know whether the spike was real before it was sent. Action: I traced the cancelled accounts back to the source table and found that a billing system migration had marked paused accounts as cancelled. I wrote a query to separate the two statuses, rebuilt the month’s figures and confirmed the pattern with the billing team before changing anything. Then I added a note to the report explaining the correction and a simple check that flags any month where churn moves sharply, so someone reviews it before it is shared. Result: Leadership received the corrected figure on time, and the check stayed in the report after my internship ended.
Question: “Tell me about a time a stakeholder asked for something vague.” Situation: As a junior analyst at a nonprofit, the fundraising director asked me for “everything we know about our donors” before a board meeting. Task: I had a week, and the donor database had years of records across several campaigns. Action: Rather than starting a giant report, I asked her what the board would decide. The real question was whether to keep funding a monthly giving program. I agreed with her on three measures: how many monthly donors stayed for a year, their average annual gift compared with one-time donors, and the cost of recruiting them. I built a one-page summary in Excel with a pivot table behind each number and flagged that the cost figure relied on the finance team’s estimate. Result: The board kept the program and asked for the same page every quarter. Since then I start every vague request by asking what decision it supports.
Questions to ask in a data analyst interview
Your questions show how you think about data work, and the answers tell you whether the job is analysis or mostly manual report pulling. Pick two or three that matter to you; the questions to ask in an interview guide covers general ones, and the questions to ask the interviewer generator can tailor a list to the posting.
- “What decisions has this team’s analysis influenced recently?”
- “Where does the data come from, and who owns data quality when something looks wrong?”
- “How much of the role is recurring reporting versus new analysis?”
- “Which tools does the team use day to day, and how are queries and dashboards reviewed?”
- “Who are the main stakeholders, and how do requests reach the team?”
- “What would a successful first 90 days look like for this analyst?”
Common data analyst interview mistakes and how to prepare
Most weak answers fail on reasoning or communication rather than technical knowledge. These are the patterns to avoid.
To practice with questions closer to your real interview, paste the actual job posting into the interview question generator to get questions for that role and interview stage, whether a phone screen, a hiring manager conversation, a panel or a final round. Rehearse SQL out loud against a sample database, and after each interview, send a short note referring to something specific you discussed, as covered in thank-you emails after an interview.
- Mistake: writing SQL in silence. Fix: talk through the grain of each table, your join choice and how you handle nulls before typing.
- Mistake: skipping data checks in a case. Fix: say what you would verify first, even when the interviewer hands you a clean table.
- Mistake: listing tools instead of outcomes. Fix: name the question, what you found and what someone did with it.
- Mistake: overstating certainty. Fix: give your confidence, the main limitation and what would change your conclusion.
- Mistake: using company figures from a past employer. Fix: describe the scale or direction of a result without sharing confidential numbers.
Your checklist
Ticks stay on this page and are not saved.
Common questions
How much SQL do I need for a data analyst interview?
For most analyst roles, expect to write queries that filter, join several tables, group and aggregate, and use common window functions such as ranking and running totals. Interviewers rarely expect database administration. What they do expect is that you can explain why your query returns the right rows, including how it treats nulls, duplicates and ties, and that you check results instead of assuming they are correct.
What should I do if I get stuck on a live SQL question?
Say where you are stuck and talk through what you know. Break the problem into steps, such as writing the join first and checking its row count, then adding the aggregation. Ask whether the interviewer wants exact syntax or the approach. A clear partial solution with sound reasoning usually scores better than silence, and interviewers often give hints when they can see how you think.
Do data analyst interviews include Python or R?
It depends on the posting. Many business-facing analyst roles focus on SQL, spreadsheets and a dashboard tool, while more technical or product analytics roles may include Python or R questions on loading, cleaning and summarizing data. If the posting lists a language, prepare for at least basic data manipulation in it. If it does not, ask the recruiter what the technical round covers.
How long should I spend on a data analyst take-home assignment?
Follow the time the employer suggests, and if they do not give one, ask. Use the time to answer the stated question well rather than to show every technique you know. Lead with the answer and recommendation, keep your work reproducible and list assumptions and what you would do with more time. If you stop short of a full analysis, say so honestly.
How do I answer data analyst interview questions with no work experience?
Use coursework, personal projects, volunteer work or analysis you did in a non-analyst job, such as tracking inventory or reporting in spreadsheets. Choose projects with a real question and a messy dataset, and be ready to explain your cleaning decisions and conclusions. Interviewers care that you can reason with data and communicate results, and a well-explained small project shows that better than a long list of tools.
Sources and editorial notes
- Data Scientists, Occupational Outlook Handbook — U.S. Bureau of Labor StatisticsDescribes the work of this closely related occupation: identifying useful data, cleaning raw data, presenting findings with visualization software and making business recommendations, plus important qualities including communicating to technical and nontechnical audiences.
- Window Functions (Tutorial, Section 3.5) — PostgreSQL DocumentationExplains that window functions calculate across related rows without grouping them into one output row, use PARTITION BY and ORDER BY within OVER, and cannot appear in WHERE, so filtering on them needs a sub-select.
- Structured Interviews — U.S. Office of Personnel ManagementDefines structured interviews scored against benchmarks, distinguishes situational from behavioral description questions and gives “Describe a situation where you analyzed and interpreted information” as a behavioral example.
Written by the Applystead editorial team with AI assistance, from the public sources above and original illustrative examples. Examples are not real applicant outcomes. This is general job-search information, not legal, tax or financial advice; hiring practices and local rules vary. No independent expert review is claimed. How we write and check guides.
Data
Compare Applystead
More Interviews guides
- Interview preparation: a step-by-step plan you can actually rehearse
- How to answer “Tell me about yourself” in an interview (with examples)
- What are your strengths and weaknesses? How to answer, with 12 examples
- How to answer “Why do you want to work here?” (5 sample answers)
- How to answer “Why should we hire you?” (with sample answers)
- Where do you see yourself in 5 years? How to answer (with examples)