SQL from Scratch: A 30-Day Plan for Placements and Data Jobs
Learn SQL step by step, from SELECT to joins and window functions, with the query patterns interviewers actually ask.
- Duration
- 30 days
- Level
- Beginner
- Daily time
- 1 hour
- Target
- ~100 queries
- Used in
- Developer, data & testing roles
Written by InfySkill Trainer Team Β· 11 min read
Before you start
The 30-day plan
What a database is, and your first queries.
Summarise data: the most common interview topic.
Combine tables, the skill that separates beginners from job-ready.
The advanced patterns behind βsecond highest salaryβ and βtop N per groupβ.
Database design questions and timed practice.
Classic SQL interview questions
Practise these until you can write them without looking:
- Find the second highest salary (with and without LIMIT).
- Find duplicate rows in a table.
- Show employees who earn more than their manager (self join).
- Top 3 earners in each department (window function).
- Departments with no employees (LEFT JOIN β¦ IS NULL).
- Difference between WHERE and HAVING, DELETE and TRUNCATE, UNION and UNION ALL.
Common mistakes
- Memorising queries instead of understanding joins. Draw the tables on paper first.
- Forgetting NULL behaviour: NULL = NULL is not true; use IS NULL.
- Using GROUP BY without understanding which columns can be selected.
- Only reading. Type and run every query yourself.
FAQs
MySQL or PostgreSQL?
Either. Basic SQL is almost the same in both. MySQL is common in Indian company tests; PostgreSQL is popular in startups.
Is SQL enough for a data analyst job?
It is the most important skill, but add Excel and a BI tool such as Power BI. See the Data Analyst roadmap.
Do developers need SQL?
Yes. Almost every backend, full stack and testing role uses a database, and SQL is asked in technical interviews.
