Interviews
Data Analyst Interview Questions and Answers for 2026
August 18, 2026 · 7 min read · Upleva team

You’re halfway through a SQL screen when the interviewer says, “Here’s the schema,” and the schema looks like it was assembled during three different reorganizations. Users are in one table, orders are in another, and the date column has a name that suggests nobody has spoken to the database since 2018. Then comes the follow-up: “Why did conversion fall?”
That combination is what makes data analyst interview questions feel harder than a practice set. The test usually isn’t whether you can recite exotic SQL. It’s whether you can clarify the question, work safely with imperfect data, and explain what your result means to someone who doesn’t dream in joins.
What data analyst interviews usually test
Most interviews move through four areas: live SQL, an analytics case study, a project or take-home discussion, and behavioral questions. Tools vary by company. The underlying judgment changes less.
- SQL fundamentals: joins, GROUP BY, aggregates, date filters, CASE statements, NULL handling, and window functions.
- Investigation: how you define a metric, establish a baseline, check data quality, and narrow down a change.
- Communication: whether you can explain a result, limitation, or recommendation without hiding behind a dashboard.
- Ownership: what you personally did, what went wrong, and what you would improve next time.
For junior roles, clear reasoning matters more than advanced syntax. For mid-level roles, expect more questions about tradeoffs, stakeholder needs, and whether your analysis changed a decision.
SQL interview questions for data analysts
Before writing a query, ask one useful question about the data: what is the grain of each table? Is one row an order, an order item, or a customer-day? Which timestamp counts? Ten seconds of clarification can prevent ten minutes of confident nonsense.
Question: Find monthly revenue by customer segment
State your assumptions first: revenue comes from completed orders, and in this schema, status = 'completed' excludes refunds. The segment comes from the customer table at the time of analysis. This is PostgreSQL syntax. DATE_TRUNC will need adjustment for platforms such as MySQL, BigQuery, or SQL Server.
SELECT DATE_TRUNC('month', o.order_date) AS month, c.segment, SUM(o.amount) AS revenue FROM orders o JOIN customers c ON o.customer_id = c.customer_id WHERE o.status = 'completed' GROUP BY 1, 2 ORDER BY 1, 2;
The query is ordinary. That’s the point. Explain what you’d validate: duplicate order IDs, whether amount includes tax, and whether customer segments are historical or current. Interviewers often learn more from those checks than from a fancy subquery.
Question: Find each user’s second purchase
Use ROW_NUMBER when you need to rank events within each user. Make the tie rule explicit if timestamps can match:
WITH purchases AS (SELECT user_id, purchase_id, purchase_date, ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY purchase_date, purchase_id) AS purchase_number FROM orders WHERE status = 'completed') SELECT user_id, purchase_id, purchase_date FROM purchases WHERE purchase_number = 2;
“If the business defines a second purchase by distinct calendar day rather than transaction, I’d change the logic.” A metric is a business definition, not just a column.
Question: What happens when a left join inflates results?
Say it plainly: if one customer matches five order rows, joining customer-level data to orders creates five customer rows. Aggregate at the correct grain before joining, or count distinct IDs when that matches the question.
Also mention NULLs. COUNT(*) counts rows, while COUNT(column) ignores NULL values. A WHERE condition on the right table after a LEFT JOIN can effectively turn it into an INNER JOIN. Small details, large consequences. SQL does enjoy this particular joke.
How to answer an analytics case study
A common prompt is: “Active users dropped sharply this week. What do you do?” Don’t jump straight to a query or declare that the product is broken. Start by defining the problem.
- Clarify the metric. How are active users defined? Is it daily or weekly active users? Which events count?
- Check the baseline. When did the change begin, and how does it compare with the previous period and normal seasonality?
- Check measurement first. Look for tracking changes, delayed pipelines, missing partitions, authentication problems, and dashboard logic changes.
- Segment the result. Break it down by platform, country, app version, acquisition channel, and customer type.
- Compare related metrics. Did sessions, sign-ins, purchases, support tickets, or revenue move in the same direction?
- Recommend the next action. State what you know, what you don’t, and which check would reduce uncertainty fastest.
“Before I investigate the cause, I’d confirm that the metric is defined consistently and that the data pipeline is complete.”
If the interviewer asks about data that cannot fit in memory, don’t automatically say “use Spark.” Ask where the bottleneck is: storage, query execution, network transfer, or the analysis tool. Then suggest filtering early, selecting needed columns, aggregating at the source, processing in partitions, or using a warehouse function. The right answer depends on the workload.
A concise case study answer
“I’d first confirm the definition of active user and the comparison period. Next, I’d check whether the event pipeline or dashboard changed. If the data is sound, I’d segment the drop by platform, geography, version, and acquisition source, then compare it with sessions and downstream conversion. If the decline is isolated to one app version, I’d check the release and quantify affected users. If all segments move together, I’d investigate a broader product or tracking issue.”
Notice what this answer avoids: pretending to know the cause before looking. That restraint is analytical skill, not hesitation.
How to present a data analyst take-home assignment
A take-home isn’t a competition to fit the most charts onto one screen. Present the decision first, then the evidence.
- Open with the business question and your one-sentence conclusion.
- Show the two or three findings that support it, not every chart you made.
- Explain your method briefly: cleaning, definitions, filters, and important assumptions.
- Name limitations, including missing fields, possible bias, small segments, or uncertain causality.
- End with a recommendation and the next analysis you’d run.
Try this opening: “The main opportunity is improving repeat purchase among new customers. I found that repeat purchase is lower for this group, although the dataset doesn’t let me separate product experience from acquisition quality. I recommend testing onboarding changes and tracking repeat purchase by cohort.”
If your result is inconclusive, say so without apologizing: “I couldn’t establish causation from this dataset, but the strongest association is between onboarding completion and repeat purchase. I’d test that relationship with a controlled experiment.” Honest limits make the work more credible.
Project and behavioral questions to prepare
Choose one or two projects you know cold. Be ready to explain why you cleaned the data a certain way, why you chose a chart, what you left out, and what changed because of the work. The public dataset is less important than your decisions.
For “Tell me about a mistake,” avoid the polished non-mistake about caring too much. Use a real analytical failure with a fix:
“I joined a transaction table to a customer table before checking the grain, which duplicated some results. I caught it during a reconciliation against the source total, rebuilt the query at the correct grain, and now I validate row counts and totals after every major join.”
For disagreement, describe the decision rather than the personality clash: “A stakeholder wanted a single overall conversion rate, but I showed that the aggregate hid a large difference between new and returning users. We reported both views and agreed on the segment that matched the decision.”
A practical final-week plan
- Write five medium SQL queries using joins, aggregation, dates, CASE, and window functions.
- Practice explaining the grain and assumptions before touching the keyboard.
- Run through one metric-drop case aloud in five minutes.
- Prepare a three-minute project story with the question, method, result, and limitation.
- Review your take-home until you can explain every chart, then remove two charts that don’t earn their space.
- Prepare two questions about the team’s metrics, data quality, and how analysis reaches decisions.
Upleva Interviews lets you rehearse live voice interviews using your resume and target role, with per-question reports, coach notes, and a transcript afterward. It’s useful when your SQL is fine but your explanation keeps wandering into the weeds.
The best answers to data analyst interview questions are rarely the most complicated. Define the metric. Check the data. Show your reasoning. Make a recommendation that fits what you actually know. That’s the analyst they’re trying to meet.