SQL
30 DAYS
ROADMAP
MASTER SQL FOR FREE IN JUST 30 DAYS
FREE RESOURCES TO LEARN AND PRACTICE ONLINE
Disclaimer: Everyone has a unique learning style and this roadmap shares my experience to help you learn SQL.
Rishabh Mishra
Week - 1
BASIC SQL- Introduction
First week learn basics of SQL: what is SQL, application, database, tables, data types, create,
update, delete, filter, operators and sort values
SQL TOPICS RESOURCES
Introduction to SQL https://www.youtube.com/watch?v=yH1zCq-iaeU
Data Types, Primary-Foreign Keys & Constraints https://www.youtube.com/watch?v=HmH-76_2Ak8
Install sql: postgre sql and pgadmin4 https://www.youtube.com/watch?v=E-Qn2tbcmDE
CREATE Database & CREATE Table https://www.youtube.com/watch?v=v-2cIUgx_jw
INSERT UPDATE, DELETE & ALTER Table https://www.youtube.com/watch?v=4YAAgrm8_ZI
SELECT Statement & WHERE Clause + Operators +
https://www.youtube.com/watch?v=eiLqDeDp7Oc
Order By + Limit
W3schools website to learn SQL https://www.w3schools.com/sql/
Note: Don’t skip any topic mentioned above
Sample Questions
• What is SQL and Database, example primary key vs foreign key, types of operators etc.
• SELECT list of employees whose salary ranges between 2L to 3L
• Write a query to retrieve the list of employees from the same city
• Query to find the null values in the Employee table
Practice SQL
After completing week-1 topics,
• Solve question 1 (a,b,c): https://youtu.be/aGGJLDgIrD8?si=9gucsXr_UCxatZJg
• Go to HackerRank and solve SQL questions use filter as Skills= SQL (Basic), Difficulty=
Easy and Sub Domains= Basic Select + Advanced Select - Click Here
Note: If get stuck at any question, check the solution and learn/revise that topic
Rishabh Mishra
Week - 2
INTERMEDIATE SQL
Second week learn: Import file, SQL functions & types, String functions, Aggregate functions,
Group By, Having clause and date time functions
SQL TOPICS RESOURCES
Import Excel (CSV) File https://www.youtube.com/watch?v=rfWYbMd3ApA
Functions in SQL + String Functions https://www.youtube.com/watch?v=55_UN5gVARs
Aggregate Functions https://www.youtube.com/watch?v=9NfthspfXEo
Group By and Having Clause https://www.youtube.com/watch?v=SvJLXj05cow
Date Time Function + Extract Clause https://www.youtube.com/watch?v=kwGh6XvLrEk
W3schools website to learn SQL https://www.w3schools.com/sql/
Note: Don’t skip any topic mentioned above
Sample Questions
• What is a Function in SQL, types of functions, user defined function, how to import files,
explain String/Aggregate functions, what is group by and its use, where vs having, etc.
• Find male and female employees’ ratio; fetch 50% records from the Employee table
• Query to fetch the employee’s salary but replace the LAST 2 digits with ‘XX’
• Query to find all the Employee names whose name starts/ends/contains
• Write a query to find and remove duplicate records from a table
Practice SQL
After completing Week-2 topics,
• Solve question 2 (b,c), 3, 5 (a,b), 7 (a): https://youtu.be/aGGJLDgIrD8?si=9gucsXr_UCxatZJg
• Solve all interview questions: https://youtu.be/AZzTHWF7tEc?si=a1nXPCSffh11XYlR
• Group by interview question (learnsql.com website): Click Here
• Go to HackerRank & solve SQL, use filter Skills= SQL (Basic), Difficulty= Medium- Click Here
Rishabh Mishra
Week - 3
ADVANCE SQL (Very Important)
Third week learn: SQL Joins, types of joins, Union, Union all, Sub query (with operators) and
window functions with examples (Rank, Row Number, Lead/Lag, etc)
SQL TOPICS RESOURCES
Complete SQL JOINS https://www.youtube.com/watch?v=H6988OpZKTU
Union & Union ALL + SELF JOIN https://www.youtube.com/watch?v=V3xjmBi1QQE
Sub Query https://www.youtube.com/watch?v=5O2OuN1ougU
Window Function https://www.youtube.com/watch?v=S1do1EeA7ng
W3schools website to learn SQL https://www.w3schools.com/sql/
Note: Don’t skip any topic mentioned above
Sample Questions
• What is a SQL JOIN, types of JOINS, UNION vs UNION ALL, SELF JOIN, CROSS JOIN, Sub
query, window functions & examples, Aggregate vs window function etc.
• Explain row number, rank, dense rank and ntile functions.
• Find the cumulative sum of employee’s salary; fetch even & odd rows from Emp table
• Find Nth highest salary from Emp table without using the TOP/LIMIT keywords
• Find the total count of employees joined each year in the company/ find monthly sales
Practice SQL
After completing Week-3 topics,
• Solve question 2 (a), 4, 6, 9: https://youtu.be/aGGJLDgIrD8?si=9gucsXr_UCxatZJg
• SQL window functions QnA (learnsql website): Click Here
• Solve all questions (SQLPractice website): https://www.sql-practice.com/
• Go to HackerRank & solve SQL, use filter Skills= All, Difficulty= All, Subdomains=
‘Aggregation’, ‘Basic Join’, ‘Advanced Join’- Click Here
Rishabh Mishra
Week - 4
PRO SQL
Finally, fourth week learn: Case Statement/Expressions, Common table Expression (CTEs),
WITH Clause, Recursive CTE, Store Procedure, Triggers. Now practice as much as you can!
SQL TOPICS RESOURCES
Case Statement/Expression https://www.youtube.com/watch?v=n_0kijUi7IA
Common Tables Exp CTEs in SQL https://www.youtube.com/watch?v=WHBH0yz35_8
Recursive Queries/CTE Click here
Stored Procedure https://www.w3schools.com/sql/sql_stored_procedures.asp
Triggers in SQL https://www.geeksforgeeks.org/sql-trigger-student-database/
Note: Don’t skip top 3 topics mentioned above
Sample Questions
• Explain CTE and it’s use cases, what is WITH clause, what is recursive CTE, explain CASE
expressions, Stored procedure and use cases, Explain triggers, etc.
• Find the 2nd & 3rd highest salary for each project from the Emp table
• Create groups based on salary column (low, med, high) based on salary range
• Query to pivot the data in the Employee table and retrieve the total salary for each city.
• Find the total monthly salary based on their team/project they are working in
• write a stored procedure, to retrieve the name of the employee based on their Id using
the output parameter as @Name
Practice SQL
After completing Week-4 topics,
• Solve all questions: https://youtu.be/aGGJLDgIrD8?si=9gucsXr_UCxatZJg
• SQL CTEs QnA (learnsql website): Click Here
• Stored Procedure QnA (dotnettutorials website): Click Here
• Go to HackerRank & try to solve all questions (tick mark all options)- Click Here
Rishabh Mishra
FREE SQL RESOURCES
To Learn & Practice Online
Website to Practice SQL RESOURCES
W3schools https://www.w3schools.com/sql/
SQL Practice https://www.sql-practice.com/
HackerRank https://www.hackerrank.com/domains/sql
leetcode https://leetcode.com/studyplan/top-sql-50/
SQL Zoo https://sqlzoo.net/wiki/SQL_Tutorial
stratascratch https://www.stratascratch.com/
8 week sql Challenge by Danny https://8weeksqlchallenge.com/
Related Resources:
• Complete SQL in One Video: Click Here
• SQL Interview Questions & Answers: Click Here
• SQL PROJECT – Music store analysis: Click Here
• Data analyst roadmap: Click Here
• BUSINESS ANALYST ROADMAP: Click Here
Rishabh Mishra
CLICK ON BELOW LINKS, FOR MORE VIDEOS /
POSTS RELATED TO DATA SCIENCE & ANALYTICS
YouTube: https://www.youtube.com/@RishabhMishraOfficial
Instagram: https://www.instagram.com/rishabhnmishra/
LinkedIn: https://www.linkedin.com/in/rishabhnmishra/
Free ka gyan
“Karm karo, phal ki chinta mat karo.”
See you next time, until then..
Keep learning n keep growing
Rishabh Mishra