Data Analyst Interview Questions and Answers: SQL, Excel, Power BI and More
Data analyst interviews test SQL, Excel, Power BI, statistics and how you think through business problems. These are the data analyst interview questions asked most, with short answers and what the interviewer wants to hear.
Anup Ojha, Former CTO
· 7 min read

On this pageShowHide
Data analyst is one of the most popular ways into tech for Indian freshers, and for switchers coming from commerce, engineering and operations. Once you know the pattern, the interviews are predictable. SQL interview questions nearly always come first, then Excel interview questions, a BI tool like Power BI or Tableau, some statistics and a business case. Below are the data analyst interview questions asked most often, with short model answers and a note on what the interviewer is looking for.
How data analyst interviews are structured
- Online test: SQL queries, aptitude and sometimes Excel tasks.
- Technical round: SQL on a shared screen or whiteboard, Excel and BI questions, statistics basics.
- Case or assignment: a dataset to analyse, or a metric question like "why did orders drop 10 percent last week?".
- HR or managerial round: communication, projects and motivation.
SQL interview questions
1. What is the difference between WHERE and HAVING?
WHERE filters rows before grouping. HAVING filters groups after aggregation. Row conditions go in WHERE, and conditions on aggregates like COUNT(*) > 5 go in HAVING.
2. Explain the types of joins.
INNER JOIN returns rows that match in both tables. LEFT JOIN returns every row from the left table plus any matches, with NULL where there's no match. RIGHT JOIN does the opposite. FULL OUTER JOIN returns all rows from both tables. A SELF JOIN joins a table to itself, say employees to their managers.
3. Find the second highest salary.
SELECT MAX(salary)
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);
Expect the follow-up "what about the Nth highest?" A window function handles that more cleanly:
SELECT salary FROM (
SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk
FROM employees
) t
WHERE rnk = 3;
4. What is the difference between RANK, DENSE_RANK and ROW_NUMBER?
ROW_NUMBER gives every row its own number. RANK gives tied rows the same rank and then skips ahead (1, 1, 3). DENSE_RANK also gives ties the same rank but leaves no gap (1, 1, 2).
5. Find the top 3 products by revenue in each category.
WITH ranked AS (
SELECT category, product, SUM(revenue) AS total,
ROW_NUMBER() OVER (PARTITION BY category ORDER BY SUM(revenue) DESC) AS rn
FROM sales
GROUP BY category, product
)
SELECT category, product, total FROM ranked WHERE rn <= 3;
6. How do you calculate month over month growth?
Aggregate by month first. Then use LAG() to pull the previous month's value into the same row and compute (current - previous) / previous.
7. How do you find duplicate records?
Use GROUP BY on the columns that define a duplicate and keep the groups with HAVING COUNT(*) > 1. If you need to delete duplicates but keep one copy, number the rows with ROW_NUMBER() partitioned by those columns and delete anything numbered above 1.
8. What is the difference between UNION and UNION ALL?
UNION removes duplicates, which makes it slower. UNION ALL keeps every row.
9. How do NULLs behave in SQL?
NULL means unknown, so = NULL never matches anything. Use IS NULL instead. COUNT(column) skips NULLs but COUNT(*) doesn't, and COALESCE swaps NULLs for a default value.
Excel interview questions
10. VLOOKUP vs XLOOKUP vs INDEX MATCH?
VLOOKUP only looks to the right and breaks when someone inserts a column. INDEX MATCH looks in any direction and survives column changes. XLOOKUP, available in Microsoft 365 and newer Excel versions, does both in one function and handles not-found values neatly.
11. How do you use a pivot table?
Select the data, insert a pivot table, then drag dimensions into Rows or Columns and measures into Values. Score extra points by mentioning date grouping, calculated fields, slicers and refreshing after the source data changes.
12. SUMIF vs SUMIFS?
SUMIF handles one condition, SUMIFS handles several. Watch the argument order, because in SUMIFS the sum range comes first.
13. How would you clean a messy dataset in Excel?
Remove duplicates, run TRIM and CLEAN to get rid of stray spaces, split fields with Text to Columns or Flash Fill, standardise dates and deal with blanks. If it's a job you'll repeat, do it in Power Query so the steps can be rerun.
14. What is conditional formatting used for?
Spotting patterns quickly: values above a threshold, duplicates, the top 10 items, or colour scales for side-by-side comparison.
Power BI interview questions
15. What is the difference between a calculated column and a measure?
A calculated column is worked out row by row when the data refreshes, and it's stored in the model. A measure is calculated at query time using the filter context of the visual. Use measures for aggregations like total sales, and columns when you need a value on each row, such as an age band.
16. Explain filter context and CALCULATE.
Filter context is the set of filters that slicers and a visual's rows and columns apply to a calculation. CALCULATE evaluates an expression while changing that context, for example CALCULATE([Total Sales], Sales[Region] = "South").
17. What is a star schema and why does Power BI prefer it?
It's a central fact table (transactions) linked to dimension tables (date, product, customer). Relationships stay simple, DAX gets easier to write and reports run faster.
18. Import mode vs DirectQuery?
Import loads the data into the Power BI model. It's fast, but you need scheduled refreshes. DirectQuery hits the source live, so the data stays current, though it can be slower and some DAX features aren't available.
19. What is row-level security?
Rules that limit which rows a user can see, like a regional manager seeing only their region. You set them up as roles with DAX filters.
Statistics and business questions
20. Mean vs median: when would you use each?
Go with the median when outliers skew the data, as with salaries or order values. The mean is fine when the data is roughly symmetric.
21. What is the difference between correlation and causation?
Correlation means two variables move together. Causation means one actually changes the other. Ice cream sales and AC sales both climb in summer, but neither causes the other.
22. Daily orders dropped 15 percent yesterday. How would you investigate?
Rule out data problems first, such as broken tracking or pipeline delays. Then segment by platform, city, category, new vs returning users and acquisition channel. Compare against the same day last week, check for outside events like holidays or outages, and pin down where the drop is concentrated before you suggest causes.
23. Which metrics would you track for a food delivery app?
Orders, active users, conversion rate, average order value, delivery time, cancellation rate, repeat rate and customer acquisition cost. Don't just list them. Say why each one matters.
Project and behavioural questions
24. Walk me through a data project you did.
Cover the business question, where the data came from, how you cleaned it, the analysis, the dashboard and the insight you'd act on. The interviewer will probe each step to see whether you did it yourself.
25. How do you explain findings to non-technical stakeholders?
Start with the answer, back it with one clear chart, and finish with a recommendation. For any "tell me about a time" follow-ups, use the STAR method.
How to prepare in three weeks
- Week 1: SQL every day: joins, aggregations, window functions and CTEs on practice platforms.
- Week 2: Excel and Power BI: build one dashboard end to end and learn ten core DAX measures.
- Week 3: statistics basics, two business case questions a day, and mock interviews.
Your resume should show the same skills the interview tests. Our guide to skills-based resumes shows how to present projects, and if you're still applying, these resume summary examples show how to open with your strongest dashboard.
LetSwitch can help you get interview ready. Score your resume against a data analyst job description with the ATS resume builder, practise role-specific questions from the dynamic question generator in AI mock interviews, and see where you stand with the readiness score. Start free on LetSwitch.
- data analyst interview questions
- sql interview questions
- excel interview questions
- power bi interview questions
- data analytics
- freshers
Frequently asked questions
What are the rounds in a data analyst interview?
Usually there's an online assessment or SQL test, then a technical round on SQL, Excel and a BI tool, sometimes a case study or take-home assignment, and finally an HR or managerial round. Product companies often add a business case round where you pick metrics and explain why a number went up or down.
Which SQL topics are most important for data analyst interviews?
Joins, GROUP BY with HAVING, subqueries, CTEs, window functions like ROW_NUMBER, RANK and LAG, date functions, CASE WHEN and NULL handling. Practise the classic patterns: top N per group, running totals, month over month change and finding duplicates.
Is Excel still asked in data analyst interviews?
Yes, especially at Indian services firms and in consulting, finance and operations roles. Expect XLOOKUP or VLOOKUP, INDEX MATCH, pivot tables, conditional formatting, SUMIFS and COUNTIFS, data cleaning, and sometimes basic charts or Power Query.
Do I need Python for a fresher data analyst role?
Most entry-level roles list SQL and Excel as must-haves and Python as a plus. Pandas basics like reading files, filtering, grouping and merging will help you, but in the interview itself, SQL depth usually counts for more.
How do freshers prove data analyst skills without experience?
Build two or three end-to-end projects on public datasets. Clean the data, analyse it in SQL or Python, build a dashboard in Power BI or Tableau, and write a short note on the business insights. Put the links on your resume and be ready to defend every decision you made.


