SQL Roadmap
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
i
id
SQL Topics Resources
Database Concepts (Database, DBMS, Data
https://youtu.be/pVKT4N-Cgb8?si=L399JHfwFAU4Pb
Models, RDBMS and SQL)
gD
Data Types, Primary-Foreign Keys &
Constraints
VW
https://youtu.be/unREmbNASaI?si=HOO-iOy6KCWK
7sTu
Install sql: postgre sql and pgadmin4 https://youtu.be/1aybOgni7lI?si=4ubqe_n50UplqI2_
in
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 +
od
https://www.youtube.com/watch?v=4YAAgrm8_ZI
Operators + Order By + Limit
W3schools website to learn SQL https://www.w3schools.com/sql/
Sample Questions
C
● 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,
● Go to HackerRank and solve SQL questions - Click here
Week - 2
INTERMEDIATE SQL
Second week : 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=ftlJoXEBmis
Functions in SQL + String Functions https://youtu.be/GQj6_6V_jVA?si=LbxJBBX04O4JnH_X
i
id
Aggregate Functions https://www.youtube.com/watch?v=9NfthspfXEo
Group By and Having Clause https://youtu.be/jk6_L0k8VPg?si=6vsmXWMja0T46eDa
Date Time Function + Extract Clause https://www.youtube.com/watch?v=Zqn4Sxz2c50
gD
W3schools website to learn SQL
Sample Questions
https://www.w3schools.com/sql/
● What is a Function in SQL, types of functions, user-defined function, how to import files,
in
explain String/Aggregate functions, what is group by and its use, where vs having, etc. ●
Find the male and female employees’ ratio; fetch 50% of records from the Employee
table.
od
● 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.
C
Practice SQL
After completing week-2 topics,
● Group by interview question (learnsql.com website): Click here
● Go to HackerRank & solve SQL, use filter Skills= SQL (Basic), Difficulty=
Medium - Click here
Week - 3
Advanced SQL ( Very Important )
Third week : 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=0OQJDd3QqQM
Union & Union ALL + SELF JOIN https://www.youtube.com/watch?v=0OQJDd3QqQM
Sub Query https://www.youtube.com/watch?v=nJIEIzF7tDw&t=300 7s
Window Function https://youtu.be/Ww71knvhQ-s?si=OQxiez5Zl95iJjKP
i
W3schools website to learn SQL https://www.w3schools.com/sql/
id
Sample Questions
● What is a SQL JOIN, types of JOINS, UNION vs UNION ALL, SELF JOIN, CROSS
gDJOIN, Sub-query, window functions, and examples?
● Explain row number, rank, dense_rank, and ntile functions.
● Find the cumulative sum of employees' salaries; fetch even & odd rows from the Emp
table.
● Find the Nth highest salary from the Emp table without using the TOP/LIMIT
in
keywords. ● Find the total count of employees joined each year in the company/find
monthly sales.
od
Practice SQL
After completing week-3 topics,
● SQL window functions QnA (learnsql website): - Click here
● Solve all questions (SQLPractice website): - Click here
C
● Go to HackerRank & solve all SQL questions: - Click here
Week - 4
PRO SQL
Fourth week : 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=Twusw__OzA8
Common Tables Exp CTEs in SQL https://www.youtube.com/watch?v=QNfnuK-1YYY&t=329s
Recursive Queries/CTE https://www.youtube.com/watch?v=7hZYh9qXxe4
Stored Procedure https://www.youtube.com/watch?v=yLR1w4tZ36I
Triggers in SQL https://www.geeksforgeeks.org/sql-trigger-student-database/
Sample Questions
● Explain CTE and its use cases. What is a WITH clause? What is a recursive CTE?
i
Explain CASE expressions and stored procedures along with their use cases. Explain
id
triggers, etc
● Find the 2nd & 3rd highest salary for each project from the Emp table. ● Create groups
based on the salary column (low, med, high) according to the salary range.
gD
● Query to pivot the data in the Employee table and retrieve the total salary for each city.
● Find the total monthly salary based on the team/project they are working on. ● Write a
stored procedure to retrieve the name of the employee based on their ID using the output
parameter as @Name.
Practice SQL
in
After completing week-4 topics,
● SQL CTEs QnA (learnsql website): Click here
od
● Stored Procedure QnA (dotnettutorials website): Click here
● Go to HackerRank & try to solve all questions - Click here
FREE SQL RESOURCES
To Learn & Practice Online
C
SQL Topics 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
Datalemur https://datalemur.com/
8 week sql Challenge by Danny https://8weeksqlchallenge.com/
Related Resources:
● Complete SQL in One Video: Click Here
● A-Z SQL Tutorial: Click here
i
id
Follow @codingdidi –
Instagram https://www.instagram.com/codingdidi/
Youtube https://youtube.com/@codingdidi?si=TkcPMdGsgV8z61lh
gD
Linkedin www.linkedin.com/in/akansha-yadav24
in
od
C