Skip to content
πŸ’‘ Topic Guideβœ… Updated Nov 2026

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

πŸ‘€ Who is this forAny student. SQL is asked in developer, data analyst and testing interviews, and in the technical round of most service companies.
🧩 PrerequisitesNone. Install MySQL or PostgreSQL, or practise in a free online SQL editor.

The 30-day plan

Your progress
0 / 20 stepsTick steps as you finish them. Saved on this device.
  1. What a database is, and your first queries.

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.

Not sure which course is right for you?

Book a free counselling call. We'll give you a personal roadmap in English or Telugu.