Analyst interviews are practical: you'll write queries live. The same problem shapes appear across companies — practise these until the patterns are muscle memory.
Key Points
- Second-highest salary: ORDER BY + LIMIT 1 OFFSET 1, or DENSE_RANK
- Find duplicates: GROUP BY email HAVING COUNT(*) > 1
- Top 3 products per category: ROW_NUMBER with PARTITION BY
- Month-over-month growth: LAG within a monthly aggregate CTE
- Customers with no orders: LEFT JOIN … WHERE orders.id IS NULL
- Verbalise your plan before typing — interviewers grade thinking, not typing speed
.png)