Data Analyst Interview Questions and Answers (SQL, Excel, Case Studies)

Data analyst interviews usually combine a SQL test, Excel or BI questions, basic statistics, and a business case in which you explain how you would analyse a problem. Communication matters as much as technical skill.

SQL questions

WHERE vs HAVING?

WHERE filters rows before grouping; HAVING filters groups after aggregation, for example HAVING COUNT(*) > 5.

Find the second-highest salary.

SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees); or use DENSE_RANK() in a subquery and pick rank 2.

INNER JOIN vs LEFT JOIN?

An INNER JOIN returns only rows that match in both tables. A LEFT JOIN returns every row from the left table, with NULLs where the right table has no match.

What are window functions?

Functions such as ROW_NUMBER, RANK, LAG and SUM() OVER (...) that calculate across related rows without collapsing them into one row, which makes them useful for rankings, running totals and period-over-period comparisons.

Excel, BI and statistics

Business case example

Sales dropped 15% last month. How would you investigate?

First confirm the data is correct (tracking changes, missing data). Then break the drop down by region, product, channel and customer segment to find where it is concentrated. Check for seasonality and compare with the same month last year, and look for external causes such as pricing changes, stock-outs or competitor activity. Finally, present the two or three biggest drivers with a recommended action.

Frequently asked questions

Which tools should a data analyst know for interviews?

SQL is essential. Add Excel and one BI tool (Power BI or Tableau), and Python or R for more advanced roles.

How do I prepare for a case study round?

Practise structuring problems aloud: clarify the goal, break the metric down, form hypotheses, and say what data you would check.

Related guides