📘 SERIES · CHAPTER 76🎯 INTERVIEW PREP

Data Analyst Interview Questions — SQL, Python, Power BI, Statistics & HR Rounds Fully Answered

This chapter covers the questions that actually come up in data analyst interviews at product companies, banks, consulting firms, and e-commerce companies — with complete answers you can study, not just a list of topics. Organised by round so you can prepare each stage separately.

⏱ 30 min read📅 October 2026✍ EVIKA ACADEMY, Noida

How Data Analyst Interviews Are Structured

Most data analyst interviews at mid-to-large companies follow a consistent structure across 2–4 rounds. Understanding this structure lets you prepare each round separately instead of trying to prepare for everything at once.

Round 1
Screening Call
15–30 min. HR or recruiter. Background, notice period, salary expectation, basic role fit.
Round 2
Technical: SQL & Excel
45–60 min. Write queries live. Data problems, sometimes a take-home case study.
Round 3
Technical: Python / BI / Stats
45–60 min. Python/Pandas or Power BI, statistics questions, approach to analysis.
Round 4
Managerial / HR
30–45 min. Behavioural, stakeholder scenarios, why this company, career goals.

SQL Interview Questions

Q1What is the difference between WHERE and HAVING in SQL?
WHERE filters rows before aggregation; HAVING filters groups after aggregation. WHERE cannot reference aggregate functions — you cannot write WHERE SUM(revenue) > 1000 because the sum has not been calculated yet at that stage. HAVING is evaluated after GROUP BY, so it can reference aggregates. Example: if you want regions where total revenue exceeds ₹10 lakh, use HAVING SUM(revenue) > 1000000.
Q2What is a window function? Give a real-world example.
A window function performs a calculation across a set of rows related to the current row, without collapsing those rows into a single output row (unlike GROUP BY). Common window functions: ROW_NUMBER(), RANK(), DENSE_RANK(), LAG(), LEAD(), SUM() OVER, AVG() OVER. Real-world example: ranking customers by revenue within each region.
SELECT
    customer_id,
    region,
    revenue,
    RANK() OVER (PARTITION BY region ORDER BY revenue DESC) AS revenue_rank,
    SUM(revenue) OVER (PARTITION BY region) AS region_total,
    revenue / SUM(revenue) OVER (PARTITION BY region) * 100 AS pct_of_region
FROM orders;
Q3How do you find duplicate rows in a table?
Use GROUP BY on the columns that should be unique, then use HAVING COUNT(*) > 1 to find groups with more than one row.
-- Find duplicate emails
SELECT email, COUNT(*) AS occurrences
FROM customers
GROUP BY email
HAVING COUNT(*) > 1
ORDER BY occurrences DESC;

-- Find the actual duplicate rows (all columns)
SELECT *
FROM customers
WHERE email IN (
    SELECT email FROM customers
    GROUP BY email
    HAVING COUNT(*) > 1
);
Q4What is a CTE and when would you use it over a subquery?
A CTE (Common Table Expression) is a named temporary result set defined with WITH. It makes complex queries readable by naming intermediate steps, allows self-referencing for hierarchical queries, and can be referenced multiple times in the same query (unlike a subquery). Use a CTE when: (1) you need to reference the same result more than once, (2) you have multi-step logic that would nest 3+ subqueries, or (3) you need a recursive query (hierarchy, org chart, BOM).
WITH monthly_revenue AS (
    SELECT
        DATE_TRUNC('month', order_date) AS month,
        SUM(revenue) AS total_rev
    FROM orders
    GROUP BY 1
),
ranked AS (
    SELECT *,
        LAG(total_rev) OVER (ORDER BY month) AS prev_month_rev
    FROM monthly_revenue
)
SELECT
    month,
    total_rev,
    ROUND((total_rev - prev_month_rev) / prev_month_rev * 100, 1) AS mom_growth_pct
FROM ranked;
Q5Explain the difference between INNER JOIN, LEFT JOIN, and FULL OUTER JOIN.
INNER JOIN returns only rows with matching keys in both tables. LEFT JOIN returns all rows from the left table and matched rows from the right; unmatched right side is NULL. FULL OUTER JOIN returns all rows from both tables; NULL fills in where there is no match on either side. RIGHT JOIN is the mirror of LEFT JOIN and rarely used (analysts simply swap the table order and use LEFT). The most common interview follow-up: 'When would you use LEFT JOIN over INNER JOIN?' — answer: when you need all records from one side regardless of whether a match exists, such as all customers including those with no orders.
Q6Write a query to find the second highest salary in a table.
-- Method 1: subquery (works in all databases)
SELECT MAX(salary) AS second_highest
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);

-- Method 2: DENSE_RANK window function (preferred — handles ties correctly)
SELECT salary
FROM (
    SELECT salary,
           DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk
    FROM employees
) ranked
WHERE rnk = 2
LIMIT 1;

Python & Pandas Interview Questions

Q7What is the difference between loc and iloc in Pandas?
iloc selects by integer position (0-indexed). df.iloc[0] is the first row; df.iloc[2, 3] is row at position 2, column at position 3. loc selects by label — when you have a named index, df.loc['order_001'] selects that row. For most filtering work you use boolean conditions directly: df[df['revenue'] > 50000]. The interviewer usually follows up with: 'What happens if you use df.loc[0] on a DataFrame with a non-integer index?' — answer: it raises a KeyError because 0 is not a label in that index.
Q8How do you handle missing values in Pandas? Walk me through your approach.
A structured approach: (1) Quantify — df.isnull().sum() shows count per column; (isnull().sum() / len(df) * 100) shows percentage. (2) Understand — is the value missing at random, or does the absence mean something? A missing discount_pct likely means 0%, not unknown. A missing customer_id means the row is invalid. (3) Handle based on business logic:
# Drop rows where the key identifier is missing
df = df.dropna(subset=['order_id', 'customer_id'])

# Fill with business-appropriate default
df['discount_pct'] = df['discount_pct'].fillna(0)
df['city'] = df['city'].fillna('Unknown')

# Fill numerical columns with median (more robust than mean for skewed data)
df['revenue'] = df['revenue'].fillna(df['revenue'].median())

# Check result
print(df.isnull().sum())
Q9How would you find the top 3 products by revenue in each category using Pandas?
# Method 1: sort + groupby head
top3 = (
    df.sort_values('revenue', ascending=False)
    .groupby('category')
    .head(3)
    [['category', 'product_name', 'revenue']]
    .reset_index(drop=True)
)

# Method 2: rank within group
df['rank'] = df.groupby('category')['revenue'].rank(method='dense', ascending=False)
top3 = df[df['rank'] <= 3].sort_values(['category', 'rank'])
Q10What is the difference between apply() and vectorised operations in Pandas? Which is faster?
Vectorised operations (df['profit'] = df['revenue'] - df['cost']) run in compiled C via NumPy and handle millions of rows in milliseconds. apply() runs a Python function row-by-row, invoking Python's interpreter overhead for each row — typically 10–100× slower. Use apply() only when no vectorised equivalent exists, such as complex multi-column conditional logic that cannot be expressed with np.where or np.select. Never use apply() just to iterate — that is what for-loops look like in Pandas and it will fail on large datasets.

Power BI & Excel Interview Questions

Q11What is the difference between a calculated column and a measure in Power BI?
A calculated column is evaluated row-by-row at data refresh time and stored in the model — it consumes memory. Use it when you need to use the value in a slicer, or to segment/group data. A measure is evaluated at query time in the current visual's filter context and is not stored. Use it for all aggregations (SUM, COUNT, AVERAGE) and any KPI that should respond to slicers and filters. The most important rule: if the value should change when a user selects a slicer, it must be a measure.
Q12What does CALCULATE do in DAX? Give an example.
CALCULATE evaluates an expression in a modified filter context. It is the most important DAX function because it lets you override or add to the filters already applied by slicers and visuals.
-- Revenue from Online channel only, regardless of page-level channel filter
Online Revenue =
    CALCULATE(
        SUM(Sales[Revenue]),
        Sales[Channel] = "Online"
    )

-- Revenue % of grand total (remove all filters with ALL())
Revenue % of Total =
    DIVIDE(
        SUM(Sales[Revenue]),
        CALCULATE(SUM(Sales[Revenue]), ALL(Sales)),
        0
    )
Q13How do you create a Year-over-Year comparison in Power BI?
You need a properly marked Date table (Table tools → Mark as date table). Then create a prior-year measure with SAMEPERIODLASTYEAR and calculate the change.
Revenue PY =
    CALCULATE(
        SUM(Sales[Revenue]),
        SAMEPERIODLASTYEAR('Date'[Date])
    )

Revenue YoY % =
    VAR cur = SUM(Sales[Revenue])
    VAR py  = [Revenue PY]
    RETURN DIVIDE(cur - py, py, 0)
Q14What is VLOOKUP and when would you use INDEX-MATCH instead?
VLOOKUP searches the leftmost column of a range for a value and returns something from a specified column to the right. Limitations: (1) can only look right, never left; (2) breaks if columns are inserted because the column number is hard-coded; (3) slower on large datasets. INDEX-MATCH has none of these limitations. INDEX returns a value from any position in a range; MATCH finds the position of a value in a column. Combined, they can look in any direction, reference columns by header (not position), and are faster on large datasets. In modern Excel (2021+), XLOOKUP replaces both — it can look left or right, handles errors natively, and is simpler to write.

Statistics & Analytical Thinking Questions

Q15When would you use median instead of mean? Give a real example.
Use median when the data is skewed or contains outliers that would distort the mean. Real example: employee salary data. If 9 employees earn ₹5–8 LPA and one senior director earns ₹80 LPA, the mean salary is ~₹13 LPA — which does not represent any actual employee's experience. The median would be ₹6–7 LPA, which is far more representative. Another common example: house prices, response times, and income data — all typically right-skewed. The rule of thumb: if mean and median differ significantly, report both and explain why.
Q16Explain p-value to a non-technical stakeholder.
The p-value is the probability of seeing your result (or something more extreme) if there was actually no real effect. It does not measure how large the effect is — only how surprising your data would be if the null hypothesis were true. For a stakeholder: 'We ran a test. A p-value of 0.03 means that if the new button design had no real effect, we'd only see a difference this big by random chance 3% of the time. We set our threshold at 5%, so we consider the result statistically significant.' Important: always follow up with the actual effect size — a statistically significant result can still be practically meaningless if the difference is tiny.
Q17What is correlation and what does it NOT tell you?
Correlation (r) measures the strength and direction of a linear relationship between two variables, ranging from –1 (perfect negative) to +1 (perfect positive). What it does NOT tell you: (1) Causation — ice cream sales and drowning rates are both high in summer, but eating ice cream does not cause drowning. (2) Non-linear relationships — r ≈ 0 can still have a strong curved relationship. (3) Whether the relationship is meaningful — r can be 0.9 but driven by a third confounding variable. Always follow correlation with 'what could be causing this?' rather than assuming one variable drives the other.
Q18What is the difference between Type I and Type II errors in hypothesis testing?
Type I error (false positive): you reject the null hypothesis when it is actually true. You conclude the new feature works when it does not. Type II error (false negative): you fail to reject the null hypothesis when it is actually false. You conclude the new feature has no effect when it actually does. The tradeoff: reducing Type I error (lowering significance level α) increases Type II error risk. In practice, Type I errors are usually more costly in medical/regulatory contexts; Type II errors are more costly in business settings where missing a real improvement has opportunity cost. Interviewers often ask: 'Which would you rather make?' — the correct answer is 'it depends on the consequences of each error in this specific context.'

Case Study & Analytical Questions

Q19Revenue dropped 15% last month. How do you investigate?

This is the most common analytical case study question. Use a structured decomposition approach:

1. Verify the data: Is the drop real or a reporting error? Check if the data pipeline ran correctly, look at raw source data, confirm the comparison period is correct.
2. Decompose by dimension: Break revenue into: product category, geography, customer segment, channel (online/offline), new vs returning. Which dimension shows the drop? This narrows from "revenue is down" to "revenue from new customers in the North region is down."
3. Check external factors: Did a competitor launch? Was there a supply issue? Seasonality? Pricing change? Marketing spend reduction?
4. Check internal changes: Was there a product change, website change, pricing change, or sales team change around the time of the drop?
5. Quantify and prioritise: Once you know what drove it, quantify the impact of each factor and recommend the highest-leverage fix.
Q20How would you design a dashboard to track sales performance for a regional sales team?

Answer this in four parts:

Stakeholders and purpose: Start by asking who uses the dashboard. A sales rep needs their own numbers. A regional manager needs cross-rep comparison. A VP needs aggregate trends. Design for one primary audience.

KPIs for a regional sales dashboard: Total revenue vs target (MTD and YTD), conversion rate (leads → closed), average deal size, pipeline value (open deals), top 5 products by revenue, revenue by rep (bar chart), monthly trend with YoY line.

Filters: Date range (slicer with MTD/QTD/YTD presets), region, product category, rep name.

Design: KPI cards at the top (revenue, target %, conversion, deal count), trend chart in the middle, decomposition tables at the bottom. Dark/light theme respecting company branding. Mobile-friendly layout for reps checking on phone.

HR & Behavioural Questions

Use the STAR framework: Situation (context), Task (your responsibility), Action (what you specifically did), Result (measurable outcome). Keep answers to 2–3 minutes. Have 4–5 specific stories ready that can be adapted to multiple questions.
❓ Tell me about a time you found an insight that changed a business decision.
How to answer: Structure: what data you were analysing → what you noticed that others had missed → how you validated it → what recommendation you made → what decision changed and what the outcome was. Quantify the outcome if possible (revenue impact, cost saving, time saving).
❓ Describe a situation where you had to explain complex data to a non-technical audience.
How to answer: Focus on how you simplified without being condescending. Show that you adapted your language to the audience's knowledge level, used analogies, and checked for understanding. Mention what format you chose (chart vs table vs narrative) and why.
❓ Tell me about a time you disagreed with a stakeholder about what the data showed.
How to answer: Show that you are data-driven but not inflexible. Good structure: explain the disagreement clearly, what you did to understand their perspective, how you validated your interpretation, how you resolved it collaboratively. Avoid making the stakeholder sound unreasonable.
❓ How do you prioritise when you have multiple analysis requests from different teams?
How to answer: Show a systematic approach: clarify urgency vs importance for each request, ask about deadlines and business impact, communicate your current workload and realistic timelines to requesters, escalate if two requests have equal priority and conflicting deadlines. Avoid saying "I just do whatever comes in first."
❓ Where do you see yourself in 3 years?
How to answer: Align your answer with the company's growth trajectory and the role. Reasonable answer for a data analyst: developing deeper domain expertise in this industry, taking on more complex analytical projects and potentially mentoring junior analysts, and expanding into adjacent skills like ML or data engineering depending on what the team needs.

5 Questions to Ask the Interviewer

Always have 3–5 questions ready. "I have no questions" signals low interest. These questions also help you evaluate the role.

"What does a typical week look like for this analyst role?"
Why it works: Reveals whether the role is mostly report-running, stakeholder work, or actual analysis.
"What data infrastructure does the team work with?"
Why it works: Shows your technical interest and helps you understand if you'd be working with modern tools or legacy systems.
"What does success look like in the first 90 days?"
Why it works: Signals ambition and gives you a concrete picture of expectations.
"What is the biggest data challenge the team is currently working on?"
Why it works: Reveals team priorities and gives you something to connect your skills to.
"How does the data team collaborate with product / business / finance?"
Why it works: Tells you how much business influence analysts have versus just being order-takers.

Get Interview-Ready at EVIKA ACADEMY

Our data analytics course in Noida Sector 51 includes mock interview sessions covering all the question types in this chapter. Real practice with feedback — not just watching videos.

📱 Book Free Demo Class →

Frequently Asked Questions

What SQL concepts are most commonly asked in data analyst interviews?

JOINs, window functions (ROW_NUMBER, RANK, LAG, LEAD, SUM OVER), GROUP BY with HAVING, CTEs, subqueries, and aggregation functions. Practice writing queries by hand — most interviews ask you to write SQL live in a shared editor or on a whiteboard.

How should I prepare for the statistics round?

Focus on: mean vs median and when to use each, standard deviation in plain English, correlation vs causation, hypothesis testing (null hypothesis, p-value, Type I and II errors), and A/B testing basics. The focus is conceptual understanding and applying statistics to business scenarios — not calculations by hand.

What is the most common data analyst case study question?

"Revenue dropped X% last week — how do you investigate?" Framework: verify data → decompose by dimension (product/region/channel/segment) → check external factors → check internal changes → quantify and recommend. Practice this with different metrics.

What Power BI questions are asked in data analyst interviews?

Calculated columns vs measures, what CALCULATE does, how to write YoY/MTD measures, difference between SUMX and SUM, star schema vs snowflake, and how you would design a dashboard for a specific business use case.

Where can I prepare for data analyst interviews in Noida?

EVIKA ACADEMY in Noida Sector 51 includes mock interview preparation covering SQL, Python, Power BI, statistics, and behavioural rounds with real feedback. Online and offline batches. WhatsApp +91-8081035456.

🎓 Free Demo Class — Online & Offline · Noida Sector 51