sql
sql
30 DAYS
ROADMAP
MASTER SQL FOR FREE IN JUST 30 DAYS
Disclaimer: Everyone has a unique learning style and this roadmap shares my experience to help you learn SQL.
Rishabh Mishra
Week - 1
First week learn basics of SQL: what is SQL, application, database, tables, data types, create,
update, delete, filter, operators and sort values
Order By + Limit
W3schools website to learn SQL https://www.w3schools.com/sql/
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,
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
https://www.youtube.com/watch?v=55_UN5gVARs
Functions in SQL + String Functions
Aggregate Functions https://www.youtube.com/watch?v=9NfthspfXEo
https://www.youtube.com/watch?v=SvJLXj05cow
Group By and Having Clause
Date Time Function + Extract Clause https://www.youtube.com/watch?v=kwGh6XvLrEk
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,
• Go to HackerRank & solve SQL, use filter Skills= SQL (Basic), Difficulty= Medium- Click Here
Rishabh Mishra
Week - 3
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)
https://www.youtube.com/watch?v=S1do1EeA7ng
Window Function
W3schools website to learn SQL https://www.w3schools.com/sql/
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,
• 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!
https://www.youtube.com/watch?v=WHBH0yz35_8
Common Tables Exp CTEs in SQL
Recursive Queries/CTE Click here
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,
• Go to HackerRank & try to solve all questions (tick mark all options)- Click Here
Rishabh Mishra
Week - 5
Rishabh Mishra
FREE SQL RESOURCES
To Learn & Practice Online
Website to Practice SQL RESOURCES
W3schools https://www.w3schools.com/sql/
HackerRank https://www.hackerrank.com/domains/sql
leetcode https://leetcode.com/studyplan/top-sql-50/
stratascratch https://www.stratascratch.com/
Related Resources:
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/
Rishabh Mishra
LinkedIn: https://www.linkedin.com/in/rishabhnmishra/
Free ka gyan
Rishabh Mishra