Most fresher analyst interviews include a live SQL round. It is rarely about obscure syntax. Interviewers want to see that you can turn a plain business question into a correct query, and explain it. These are the patterns our students report most often.
1. Filtering and sorting
Expect a warm-up like “show customers from Kochi who ordered in the last 30 days, newest first.” Say the columns out loud before you type, then check the date condition.
SELECT name, city, order_date FROM orders WHERE city = 'Kochi' AND order_date >= CURRENT_DATE - INTERVAL '30 days' ORDER BY order_date DESC;
2. GROUP BY with HAVING
“Which products sold more than 100 units last month?” tests whether you know WHERE filters rows and HAVING filters groups. Mixing them up is the most common mistake we see.
3. JOINs, and what happens to missing rows
You’ll likely be asked to list every customer with their total orders, including customers who never ordered. That needs a LEFT JOIN, plus COALESCE to show zero instead of NULL.
4. Window functions
“Top 3 products in each category” is the question that separates candidates. Practise ROW_NUMBER() with PARTITION BY until you can write it without notes.
How to practise before the interview
Take one real dataset and answer ten business questions on it. That is how the Edure Data Analytics course runs its SQL module: one retail dataset, graded exercises, and resubmission until each query is interview-standard.