SQL • Python • Case Studies • 2026 Updated

Data Analyst Interview Questions

📊 35+ questions 📚 4 round types 🏢 Google, Amazon, Flipkart, Deloitte, McKinsey

Data analyst interviews in 2026 have shifted from basic SQL syntax to business-scenario-based case studies. Interviewers want you to translate ambiguous business problems into efficient queries, and then explain your findings to non-technical stakeholders. These questions are organized by the rounds you'll actually face.

35+Total Questions
4Round Types
15+Companies Covered
100%Free, No Sign-Up

🗣️ HR & Culture Fit

"Why data analytics?" "Walk me through a project." "How do you explain technical findings to non-technical stakeholders?" HR questions specific to DA roles.

🗄️ SQL & Querying

Retention analysis, running totals, Top-N per group, churn identification, sessionization — the 5 most-tested SQL patterns with real-world datasets.

📈 Business Case Studies

E-commerce conversion drops, subscription churn analysis, A/B test evaluation, and operations anomaly detection — the scenarios that separate strong analysts.

🐍 Python & Pandas

Data cleaning, groupby operations, merge strategies, visualization, and statistical analysis — Python coding questions asked in DA technical rounds.

🔥 5 Most-Asked Questions (Quick Preview)

1
"Write a SQL query to find the second highest salary in each department."
SQL
AmazonFlipkartDeloitte
🎯 Why They Ask This

This tests your fluency with window functions — specifically DENSE_RANK() with PARTITION BY. It's the classic "Top-N per Group" pattern. Interviewers also check if you handle edge cases: what if there's only one employee in a department? What about ties?

Winning Approach
1Clarify edge cases first — "Should ties both count as second? Or do we want distinct salaries?" (Use DENSE_RANK for ties, ROW_NUMBER for strictly one row.)
2Use a CTE for readability — Rank salaries within each department, then filter for rank = 2 in the outer query.
3Handle NULLs — "If a department has only one employee, should we return NULL or exclude it?"

Before I write the query, let me clarify two things: first, when there are salary ties, should both count as "second highest" or do we want strictly one row? I'll assume ties should both appear — so I'll use DENSE_RANK. Second, should departments with only one employee appear in the output? I'll include them as NULL for completeness.

Here's my approach using a CTE:

WITH ranked_salaries AS ( SELECT employee_id, department_id, salary, DENSE_RANK() OVER (PARTITION BY department_id ORDER BY salary DESC) AS salary_rank FROM employees ) SELECT department_id, employee_id, salary FROM ranked_salaries WHERE salary_rank = 2;

This partitions employees by department, ranks their salaries from highest to lowest, and then filters for rank 2. If we wanted to handle departments with only one employee, we could LEFT JOIN this back to the departments table.

Why DENSE_RANK over RANK? If two employees tie for the highest salary, DENSE_RANK still assigns 2 to the next salary. RANK would skip to 3, which means we'd miss the actual second-highest value.

Red Flags to Avoid
  • Using a correlated subquery instead of window functions — shows outdated SQL thinking
  • Not asking about ties or edge cases — interviewers expect you to clarify before coding
  • Deeply nested subqueries — modern interviews strongly prefer CTEs for readability
2
"Our conversion rate dropped 15% this week. Walk me through how you'd investigate."
Case Study
GoogleAmazonFlipkart
🎯 Why They Ask This

This is the most common data analyst case study format. They're NOT testing SQL here — they're testing your analytical thinking framework. Can you structure an investigation? Do you ask the right clarifying questions? Can you form hypotheses and prioritize them? The best candidates think like detectives, not query writers.

Winning Framework
1Clarify the metric — "How is conversion defined? Visits → signups? Signups → purchases? What's the exact time period and baseline?"
2Check for data issues — "Is the tracking working? Did we deploy a code change that broke event logging? Is the drop in the numerator, denominator, or both?"
3Segment the data — Break down by: channel (organic vs. paid vs. direct), device (mobile vs. desktop), geography, new vs. returning users. Look for where the drop concentrates.
4Form hypotheses — Based on segments, generate 2-3 hypotheses: "Mobile checkout is broken," "A new marketing campaign is bringing low-intent traffic," "A competitor launched a promotion."
5Validate and recommend — Write the query to test each hypothesis. Present findings + recommended action to stakeholders.

Before diving in, I'd want to clarify a few things. How is "conversion" defined here — is it visit-to-purchase, visit-to-signup, or something else? What's the baseline period we're comparing against? And is this 15% drop across all users or a specific segment?

Assuming it's visit-to-purchase conversion, here's how I'd structure my investigation:

Step 1: Data validation. First, I'd check if the tracking is working correctly. A deployment or a tracking pixel breaking can cause artificial drops. I'd look at total event counts — if page views also dropped proportionally, it's likely a traffic issue, not a conversion issue.

Step 2: Decompose the metric. Conversion = purchases / visits. Did purchases drop, or did visits spike (diluting the rate)? If visits spiked, it could be a new marketing campaign bringing lower-intent traffic.

Step 3: Segment the drop. I'd run the conversion rate by: traffic channel (organic, paid, direct, referral), device type (mobile vs. desktop), geography (country or city), and user type (new vs. returning). The goal is to find where the drop concentrates. If it's 30% on mobile but flat on desktop, that's a different problem than a uniform 15% drop everywhere.

Step 4: Hypothesize and test. Let's say the drop concentrates on mobile paid traffic. My hypotheses would be: (a) a checkout UI bug on mobile, (b) a new ad creative attracting the wrong audience, or (c) a competitor running a mobile-targeted promotion. I'd validate (a) by checking mobile checkout completion rates and error logs, (b) by looking at click-through-rate vs. bounce rate by ad creative, and (c) by cross-referencing with competitor pricing data if available.

Step 5: Recommend. Once I identify the root cause, I'd present the finding with a clear recommendation. For example: "Mobile checkout error rate increased from 2% to 8% after Tuesday's deploy. The fix is rolling back the checkout component. Estimated recovery: 2-3 days after fix."

Red Flags to Avoid
  • Jumping straight to SQL without a structured investigation plan
  • Not asking clarifying questions about metric definitions
  • Only looking at aggregate numbers without segmenting
  • Presenting findings without actionable recommendations
3
"Calculate the month-over-month user retention rate."
SQL
GoogleSpotifySwiggy
🎯 Why They Ask This

Retention analysis is the #1 most-tested SQL pattern in data analyst interviews (source: DataLemur, StrataScratch question frequency data). It tests self-joins, CTEs, date manipulation, and your understanding of cohort analysis — the bread and butter of product analytics.

Winning Approach
1Define "retained" — "A user who was active in Month N and is also active in Month N+1." Clarify what "active" means for this business.
2CTE 1: Monthly Active Users — Extract distinct user_id and activity_month from the events table.
3CTE 2: Self-join — Join current month to next month on user_id. Users present in both are "retained."
4Calculate rate — COUNT(retained users) / COUNT(current month users) grouped by month.

Let me define "retention" first: a user is "retained" in month N+1 if they performed at least one qualifying action in both month N and month N+1. I'll assume the events table has user_id, event_type, and event_date columns.

WITH monthly_users AS ( SELECT DISTINCT user_id, DATE_TRUNC('month', event_date) AS activity_month FROM events WHERE event_type IN ('purchase', 'page_view', 'session_start') ), retention AS ( SELECT curr.activity_month, COUNT(DISTINCT curr.user_id) AS total_users, COUNT(DISTINCT next_month.user_id) AS retained_users FROM monthly_users curr LEFT JOIN monthly_users next_month ON curr.user_id = next_month.user_id AND next_month.activity_month = curr.activity_month + INTERVAL '1 month' GROUP BY curr.activity_month ) SELECT activity_month, total_users, retained_users, ROUND(100.0 * retained_users / NULLIF(total_users, 0), 1) AS retention_rate_pct FROM retention ORDER BY activity_month;

A few notes: I used LEFT JOIN so months with 0% retention still appear. NULLIF prevents division by zero. And I used DATE_TRUNC + interval arithmetic rather than EXTRACT(MONTH) to correctly handle year boundaries (December → January).

4
"How would you evaluate whether an A/B test result is significant?"
Statistics + Case Study
GoogleAmazonNetflix
🎯 Why They Ask This

A/B testing is a core competency for data analysts at product companies. They want to see you understand statistical significance beyond just "p-value < 0.05." Can you identify common pitfalls like peeking, sample ratio mismatch, and novelty effects?

Winning Framework
1Check sample sizes — Is the test/control split close to the expected ratio? A mismatch signals a bug.
2Check for statistical significance — For proportions (e.g., conversion rates), use a two-proportion z-test. For means (e.g., revenue), use a t-test or Welch's t-test. Look at the confidence interval, not just the p-value.
3Check for practical significance — Is the effect size meaningful for the business? A 0.01% improvement might be statistically significant with millions of users but practically worthless.
4Check for confounds — Novelty effect (users clicking more because it's new), seasonality, and whether the test ran long enough to capture at least one full business cycle (usually 1-2 weeks).
5
"Why do you want to become a data analyst?"
HR
Every Company
🎯 Why They Ask This

They want to hear genuine curiosity about data-driven decision making, not just "data science is the hottest field." The best answers include a specific moment that sparked your interest, evidence that you've pursued it beyond coursework, and how you see it impacting real business outcomes.

The moment that hooked me was during a college project where I analyzed Uber ride data for a stats course. I was just doing the assignment — cleaning the dataset, running basic regressions. But then I noticed that ride cancellation rates spiked at a specific time window on Fridays. I dug deeper, cross-referenced it with weather data and event schedules, and found that surge pricing during rain + event overlap was causing 40% of cancellations.

That was the first time I realized that a few SQL queries and a scatterplot could surface an insight that might actually change a pricing algorithm and save millions. I was hooked on that feeling of "turning messy data into a decision someone can act on."

Since then, I've pursued this deliberately — I completed the Google Data Analytics Certificate, solved 100+ SQL problems on DataLemur, and did a freelance analytics project for a local e-commerce brand where my funnel analysis helped them increase checkout completion by 12%.

Explore all 35+ questions organized by interview round:

🗣️ HR Questions (10) 🗄️ SQL & Querying (12) 📈 Case Studies (8) 🐍 Python & Pandas (8)
Undetectable AI for live interviews

Crack any interview, no matter how tough

Data analyst interviews throw curveballs. "Now modify that query to handle duplicates." "What if the data is skewed?" When the interviewer asks an unexpected follow-up and your mind freezes, that's when preparation fails.

ClapAssist runs silently during your video call. It hears the exact question and shows you what to say — completely invisible on screen share.

Download ClapAssist with 10 Free Minutes →
Mac and Windows · Completely undetectable to interviewers · No credit card required