Interview guides / Data analyst interview questions
Top Data Analyst Interview Questions and Answers 2026
Welcome to the ultimate preparation guide for data analyst interviews in 2026. Designed especially for freshers from tier-2 and tier-3 colleges in India, this guide covers everything from basic SQL and Excel to advanced data modeling and Python. Read through the sample answers and practice speaking them out loud to build your confidence and crack your next interview.
Try Jawab AI freeBasic SQL and Database Concepts
1. What is the difference between WHERE and HAVING clauses in SQL?
The WHERE clause is used to filter rows before any grouping takes place, while the HAVING clause is used to filter groups after the GROUP BY clause has been applied. For example, you use WHERE to filter individual employee salaries before grouping, and HAVING to filter departments whose average salary is above a certain limit.
2. How do you find duplicate rows in a SQL table?
You can find duplicate rows by using the GROUP BY clause along with the HAVING COUNT(*) > 1 function. For example: SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1. This shows all email addresses that appear more than once.
3. Explain the difference between INNER JOIN and LEFT JOIN.
An INNER JOIN returns only the rows that have matching values in both tables. A LEFT JOIN returns all the rows from the left table, and the matching rows from the right table. If there is no match in the right table, NULL values are returned for the right table's columns.
4. What are aggregate functions in SQL? Give examples.
Aggregate functions perform a calculation on a set of values and return a single value. Common examples include SUM(), AVG(), COUNT(), MAX(), and MIN(). They are often used with the GROUP BY clause to summarize data.
5. What is a primary key and how is it different from a foreign key?
A primary key uniquely identifies each record in a table and cannot contain NULL values. A foreign key is a field (or collection of fields) in one table that refers to the primary key in another table, creating a link between the two tables.
Intermediate SQL and Data Manipulation
6. How do you find the second highest salary from an employee table?
You can find the second highest salary using subqueries or window functions. Using a subquery: SELECT MAX(salary) FROM employee WHERE salary < (SELECT MAX(salary) FROM employee). Alternatively, using DENSE_RANK(): SELECT salary FROM (SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) as rnk FROM employee) t WHERE rnk = 2.
7. What are window functions in SQL? Give an example.
Window functions perform calculations across a set of table rows that are somehow related to the current row, without collapsing the rows like GROUP BY does. An example is ROW_NUMBER() or RANK() used to assign a sequence number to partitions of data.
8. What is the difference between UNION and UNION ALL?
UNION combines the result sets of two or more SELECT statements and removes duplicate rows. UNION ALL also combines the result sets but includes all duplicates. UNION ALL is faster because it does not perform the extra step of filtering duplicates.
9. How do you handle NULL values in SQL queries?
You can handle NULL values using functions like COALESCE() or IFNULL() to replace NULL with a default value. To filter them out, you use IS NULL or IS NOT NULL instead of using the equals sign.
10. What is a subquery and what are its types?
A subquery is a query nested inside another SQL query like a SELECT, INSERT, UPDATE, or DELETE statement. Types include scalar subqueries, column subqueries, row subqueries, and correlated subqueries which depend on the outer query for their values.
Python and Pandas for Data Analysis
11. What is the difference between a Pandas Series and a DataFrame?
A Pandas Series is a one-dimensional labeled array capable of holding any data type, similar to a column in a spreadsheet. A DataFrame is a two-dimensional labeled data structure with columns of potentially different types, similar to an entire spreadsheet or SQL table.
12. How do you handle missing values in a Pandas DataFrame?
You can handle missing values using the dropna() method to remove rows or columns with nulls, or fillna() to replace them with a specific value like zero or the mean of the column. For example: df['column'].fillna(df['column'].mean(), inplace=True).
13. How do you filter rows in a Pandas DataFrame based on multiple conditions?
You filter rows using boolean indexing with bitwise operators. For example, to find employees in 'Sales' with salary greater than 50000, you write: filtered_df = df[(df['department'] == 'Sales') & (df['salary'] > 50000)]. Note the use of parentheses around each condition.
14. What is the use of the groupby() function in Pandas?
The groupby() function is used to split the data into groups based on some criteria, apply a function to each group independently (like sum, mean, or count), and then combine the results. It works similarly to the GROUP BY clause in SQL.
15. How do you merge two DataFrames in Pandas?
You use the pd.merge() function or the DataFrame.merge() method. You specify the left dataframe, right dataframe, the column to join on using 'on', and the type of join using 'how' (such as 'inner', 'left', 'right', or 'outer').
Business Metrics, Statistics, and Communication
16. What is Churn Rate and how do you calculate it?
Churn rate is the percentage of customers who stop using a product or service over a given time period. It is calculated by dividing the number of customers lost during a period by the total number of customers at the start of that period, multiplied by 100.
17. Explain the difference between correlation and causation.
Correlation means two variables move together or show a relationship, but it does not mean one causes the other. Causation means that one event directly causes the change in another. For example, ice cream sales and shark attacks might be correlated due to summer weather, but one does not cause the other.
18. What is A/B testing and why is it used?
A/B testing is an experiment where two variants (A and B) are compared to see which one performs better on a given metric. It is used by businesses to make data-driven decisions regarding website design, features, or marketing campaigns by showing variant A to one user group and variant B to another.
19. How would you explain a complex data finding to a non-technical stakeholder?
I would avoid technical jargon like p-values or complex database joins. Instead, I would start with the core business impact, use a simple chart or dashboard to visualize the trend, and clearly state what action the stakeholder should take based on the data.
20. What is the difference between mean, median, and mode?
The mean is the average of all data points, the median is the middle value when data is sorted in order, and the mode is the most frequently occurring value. The median is often preferred over the mean when data has extreme outliers, such as salary distributions.
Tips for the interview
- Always practice writing SQL queries on paper or a whiteboard because many interview rounds start with manual coding.
- Prepare a brief introduction about your final year project, focusing on the dataset you used and the business insights you found.
- Be ready to explain your resume clearly; do not list tools like Python or Tableau if you cannot answer basic questions about them.
- Practice talking out loud while solving analytical problems so the interviewer can understand your step-by-step thinking process.
- Remember that communication skills are just as important as technical skills for a data analyst role.
Blank on a question? Not anymore.
Jawab AI listens to your interview and shows a clear answer on your screen in seconds, based on your resume. The desktop app stays invisible when you share your screen. Your first 3 sessions of 10 minutes are free.
Try Jawab AI freeMore interview guides
- Meta Software Engineer Interview Questions 2026 Guide
- Tech Mahindra Interview Questions for Freshers 2026
- Google Software Engineer Interview Questions 2026 Guide
- HCL Tech Interview Questions and Answers for Freshers 2026
- Behavioral Interview Questions and STAR Method Answers 2026
- Selenium Automation Testing Interview Questions and Answers 2026
- Amazon Leadership Principles Interview Questions & STAR Answers 2026
- Manual Testing Interview Questions for Freshers 2026
These are commonly asked questions with sample answers, not an official list. Hiring processes change, so check the company's careers page for the current one. Jawab AI is not affiliated with any company named here.