Skip to main content
Edure
Start LearningTalk to a Counsellor

Photo: Unsplash

SQL interview questions freshers actually get asked

The queries that come up most in data analyst interviews in Kerala and Bengaluru, and how to answer them.

DA
Lead Trainer, Data Analytics · [n] yrs in analytics · [date] · 9 min read

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.

TRAINER TIP
Say “WHERE before grouping, HAVING after” as you write it. Interviewers score your reasoning as much as the result.

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.

DA
Data Analytics course · 6 months
Excel, SQL and Power BI on real company data
View
04 — NEXT STEP

Want a trainer to review your SQL?

Talk to a counsellor about the Data Analytics course, a free demo class and the next batch date.

CallWhatsApp