In this post, I am sharing what is the most comprehensive SQL roadmap and hopefully everything you need to prepare for SQL Interviews. This post will cover three key topics:
150 SQL Interview Questions
SQL Theory Questions
5 week SQL Roadmap
300+ SQL Interview Questions:
Here is the complete excel sheet of over 300+ questions for SQL which will help you ace any interview : Link.
Even practice one question a day will help you master your skills.
SQL Theory Questions
For SQL Theory Questions, I used this resource : Link which has 100+ SQL Theory questions and literally everything you need to prepare for your interview. Use this and you will be set for life in SQL Theory questions.
4 Week SQL Roadmap
Week 1: Learn the Basics of SQL (Data Retrieval)
Your first week is about understanding what SQL is and learning how to retrieve data from a database, which is essential for Data Science & Analytics.
What is SQL? Youtube Video
Basic Commands:
SELECT
&FROM
: Youtube VideoWHERE
: Youtube Video
Aggregations (COUNT, SUM, AVG, MAX, MIN): Youtube Video
Using GROUP BY (HAVING & WHERE): Youtube Video
Week 2: Databases & JOINs (Combining Data Sources)
Understanding relational databases and mastering JOINs
to combine tables is key for more complex analysis in Data Science & Analytics.
What is a relational database?: Youtube Video
Introduction to JOINs:
Week 3: Learn Window Functions (Optional Advanced Topic)
Now that you’ve mastered the basics of combining data with JOINs
, you can take things to the next level by learning window functions. These are useful for performing calculations like ranking, running totals, or moving averages across subsets of data.
What are Window Functions? Youtube Video
Common Window Functions:
ROW_NUMBER()
,RANK()
andDENSE_RANK()
: Youtube VideoWindow Functions Cheat sheet: Article
Week 4: Learn to use CTEs and sub-queries
In week 4, you’re now ready for multi-step queries. You’re really advancing in your SQL skills at this point, and you should be proud of yourself!
Learn about CTEs: Youtube Video
Learn about sub-queries: Youtube Video
.