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.
WHERE filters rows before grouping; HAVING filters groups after aggregation, for example HAVING COUNT(*) > 5.
SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees); or use DENSE_RANK() in a subquery and pick rank 2.
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.
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.
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.
SQL is essential. Add Excel and one BI tool (Power BI or Tableau), and Python or R for more advanced roles.
Practise structuring problems aloud: clarify the goal, break the metric down, form hypotheses, and say what data you would check.