Data analyst roles are among the fastest-growing in India's product and tech companies. Companies like Flipkart, Swiggy, Razorpay, Meesho, and FAANG India hire data analysts to drive product decisions, measure campaign effectiveness, and identify growth opportunities. This guide covers the complete data analyst interview question bank for India 2026.
SQL interview questions for data analysts
SQL is the most tested skill in data analyst interviews.
Core SQL questions:
1. 'Find the top 3 products by revenue in each category.' SELECT category, product, revenue FROM ( SELECT category, product, SUM(price quantity) as revenue, ROW_NUMBER() OVER (PARTITION BY category ORDER BY SUM(price quantity) DESC) as rn FROM orders o JOIN products p ON o.product_id = p.id GROUP BY category, product ) ranked WHERE rn <= 3;
2. 'Find users who made their first purchase in January 2025 and made another purchase in February 2025' (cohort retention): WITH janfirsttimers AS ( SELECT userid, MIN(orderdate) as firstorder FROM orders WHERE orderdate >= '2025-01-01' AND orderdate < '2025-02-01' GROUP BY userid HAVING MIN(orderdate) >= '2025-01-01' ) SELECT COUNT(DISTINCT j.userid) as retainedusers FROM janfirsttimers j JOIN orders o ON j.userid = o.userid WHERE o.orderdate >= '2025-02-01' AND o.order_date < '2025-03-01';
3. Window function questions: - LAG(metric) OVER (PARTITION BY userid ORDER BY month): access previous month's value per user - LEAD(metric) OVER (...): access next month's value - NTILE(4) OVER (ORDER BY revenue): assign revenue quartile to each row - SUM(revenue) OVER (PARTITION BY userid ORDER BY month): running total per user - PERCENT_RANK() OVER (ORDER BY score DESC): percentile rank of each score
Statistics questions for data analysts
Statistics interview questions:
1. 'What is the difference between mean, median, and mode and when would you use each?' Mean: sum / count; use for symmetric distributions; sensitive to outliers (one extreme value shifts the mean). Median: the middle value when sorted; use for skewed distributions (income, house prices) or when outliers are present. Mode: the most frequent value; use for categorical data (most common product category, most common failure type) or count data (most common order size).
2. 'What is an A/B test and how do you determine if the result is statistically significant?' A/B test: randomly split users (control = A, treatment = B); measure one primary metric; run until the minimum detectable effect is reached. Significance test: for conversion rate (proportion): chi-squared test or z-test for proportions. For continuous metrics (average revenue): two-sample t-test. p-value < 0.05: there is less than a 5% probability that the observed difference is due to chance; the result is statistically significant at the 5% level.
3. 'What is statistical power and why does it matter?' Power: the probability that the test correctly detects a true effect (avoids a false negative). Common target: 80% power. Power is affected by: sample size (more data = more power), effect size (a larger true effect is easier to detect), and significance threshold (setting p < 0.01 instead of 0.05 reduces power). Pre-experiment power analysis determines the required sample size to detect the minimum meaningful effect.
4. 'What is the Central Limit Theorem?' As sample size increases, the distribution of sample means approaches a normal distribution regardless of the population distribution. Practical implication: for n > 30, we can use parametric tests (t-tests) even for non-normally distributed metrics like revenue or session length.
5. 'What is selection bias and how does it affect analysis?' Selection bias: the sample is not representative of the population you want to study. Examples: survivorship bias (only analysing users who are still active excludes churned users); self-selection bias (users who voluntarily opt into a feature differ from those who do not). How to detect: compare demographic characteristics of your sample to the full user population.
Python data analysis questions
Python (pandas/numpy) interview questions:
1. 'How do you find duplicate rows in a pandas DataFrame?' df.duplicated(): returns a boolean Series (True where the row is a duplicate of an earlier row). df[df.duplicated()]: show duplicate rows. df[df.duplicated(subset=['email'])]: find rows with duplicate emails specifically. df.drop_duplicates(subset=['email'], keep='first'): keep the first occurrence, drop subsequent duplicates.
2. 'How do you merge two DataFrames?' pd.merge(df1, df2, on='userid', how='inner'): INNER JOIN on userid. how options: 'inner' (matching rows only), 'left' (all rows from df1), 'right' (all from df2), 'outer' (all from both). df1.merge(df2, lefton='id', righton='user_id'): merge on columns with different names.
3. 'How do you compute a 7-day rolling average in pandas?' df['rolling7d'] = df['revenue'].rolling(window=7).mean() # The first 6 rows will be NaN because there are fewer than 7 days of history. # Use minperiods=1 to compute partial windows: rolling(7, min_periods=1).mean()
4. 'How do you handle outliers in a dataset before analysis?' Detection: IQR method (Q1 - 1.5IQR, Q3 + 1.5IQR); Z-score (flag values where |z-score| > 3). Options: cap (winsorize values to the 1st and 99th percentile), remove (only if outliers are clearly data errors), transform (log transformation reduces the effect of extreme values on mean-based statistics), analyse separately (include outliers in one analysis, exclude in another; report both).
Practise data analyst interview questions with HireStepX's AI voice interviewer. Get scored feedback on SQL walkthroughs, A/B testing explanations, and metrics reasoning. First 2 sessions free.
Practice freeBusiness case and metrics questions
Business case questions for data analyst interviews:
1. 'How would you measure the success of a new recommendation feature on Flipkart?' First: what is the feature's goal? Increase average order value (AOV)? Increase sessions per user? Reduce time-to-purchase? Primary metric: if the goal is AOV, track average revenue per session for users who see recommendations vs those who don't (A/B test). Guardrail metrics: ensure the feature does not decrease overall conversion rate, increase return rate, or increase page load time. Leading indicators: click-through rate on recommendation cards (available immediately; correlated with longer-term purchase).
2. 'Daily active users dropped 20% this week on Swiggy. How do you investigate?' Diagnosis tree: Is it all users or a specific cohort? All cities or one? All platforms (iOS/Android/web) or one? All time-of-day or specific slots? Is it new user acquisition (fewer new users) or retention (existing users stopping)? Is it correlated with a product release, a competitor campaign, a marketing spend change, or an external event (holiday, IPL finals, bad weather in key cities)? Verify: check error rates and page load times (technical issue?) before assuming a business explanation.
3. 'Razorpay's transaction failure rate increased from 1.5% to 2.5%. Root cause analysis.' Break down by: payment method (UPI vs card vs netbanking: is one spiking?), bank (is one issuing bank failing more?), merchant (is one large merchant causing the spike?), amount range (are failures concentrated in high-value transactions?), time of day (peak load correlation?). After isolating the segment: check with that bank/payment rail's status page; check Razorpay's own gateway error logs for error codes; contact the issuing bank's technical team if a bank-side failure.
Data analyst interview preparation plan
4-week data analyst interview preparation plan:
Week 1 (SQL foundations):
- Revise SELECT, JOIN (all types), GROUP BY, HAVING, ORDER BY, LIMIT
- Practice 20 SQL problems on Stratascratch or Mode Analytics practice problems
- Learn window functions: ROWNUMBER, RANK, DENSERANK, LAG, LEAD, SUM OVER, AVG OVER
Week 2 (Advanced SQL + Python basics):
- Practice 20 advanced SQL problems (CTEs, subqueries, retention queries, cohort analysis)
- Pandas: merge, groupby, pivot_table, rolling, apply, handling nulls
- Numpy: array operations, boolean indexing, statistical functions
Week 3 (Statistics + Metrics):
- A/B testing: p-value, confidence interval, statistical power, minimum sample size
- Common distributions: binomial (conversion rate), Poisson (event counts), normal (revenue per user)
- Regression basics: linear regression interpretation (coefficients, R-squared, p-values)
- Practise 10 metric design questions: what metrics for [feature X]?
Week 4 (Interview simulation):
- Practice 5 business case questions under time pressure (30 minutes per question)
- SQL: attempt company-specific data challenges (Stratascratch has Flipkart, Amazon, Swiggy tagged questions)
- Review your own projects/work for specific examples of metrics you designed, analyses you ran, and decisions you influenced with data
Frequently asked questions
Explore more