Complete SQL Course

Master SQL
From Basic to Advanced

Kamran AhmedCourse byKamran Ahmed

A structured course to master database querying - perfect for developers, data analysts, and anyone working with data.

Robin Wieruch

Robin Wieruch

Author - Multiple best-selling books

Kamran has been in the educative space for a long time, and it shows in the way he teaches SQL: clear, structured, and straight to the point.

He breaks down SQL fundamentals in a way that's both intuitive and practical, helping you not just write queries, but truly understand how databases work.

Even if you've used SQL before, this course will fill in gaps you didn't even realize you had. Get ready to level up your database skills!

William Imoh

William Imoh

Founder and Data Enthusiast

I have been working with SQL and databases for a long time, I bought this course for the advanced chapters but ended up completing the entire course. I learned a lot of new things and it was well worth the investment.

No matter your SQL experience, this course is a must-have if you want to level up your SQL and data analysis skills. Highly recommended!

Tomáš Janků

Tomáš Janků

Software Engineer

The course and it's interactivity is excellent and I'd honestly say it's one of the best on the SQL theme I've seen out there.

Gourav Khunger

Gourav Khunger

Software Engineer

This course was absolutely brilliant! The integrated database environment to practice what I learned was the best part.

Meabed

Meabed

CTO

Kamran has clearly put a lot of thought into this course. The content, structure and exercises were all great.

Mohsin Aheer

Mohsin Aheer

Sr. Software Engineer

I already knew SQL but this course taught me a bunch of new things. Practical examples and challenges were great. Highly recommended!

Reeve Tee

Software Engineer

I found the course highly comprehensive and incredibly valuable. I would love to see more courses like this!

Zeeshan

Zeeshan

Sr. Software Engineer

Loved the teaching style and the way the course was structured. The AI tutor was a great help when I got stuck.

Adnan Ahmed

Adnan Ahmed

Engineering Manager

Having the integrated IDE made a huge difference. Being able to immediately practice what I learned was invaluable.

Kalvin Chakma

Kalvin Chakma

Jr. Software Engineer

Best SQL course I've taken. The progression from basic to advanced concepts is well thought out, and the challenges are excellent.

Faisal Ahsan

Faisal Ahsan

Software Engineer

The course and the learning experience was great. What I really liked was the no-fluff explanations and practical examples.

Course Environment

"As someone who has worked extensively with databases throughout my career, I know firsthand how crucial SQL skills are. I've created this course to share the practical knowledge that has helped me build and scale data systems at various companies."

Kamran Ahmed

Kamran Ahmed

Founder roadmap.sh @kamrify

Not your average SQL course

Built around a text-based interactive approach and packed with practical challenges, this course stands out with features that make it truly unique.

Oh, and you get the lifetime access to the course including all the future updates. Also, there is a certificate of completion which you can share with your potential employers.

Course Overview

The course is designed to help you go from SQL beginner to expert through hands-on practice with real-world scenarios, mastering everything from basic to complex queries.

1. Introduction

Get comfortable with database concepts and SQL fundamentals.

4 Lessons
1 Challenges

Lessons

Basics of Databases
What is SQL?
Types of Queries
Next Steps

Exercises

Introduction Quiz

2. SQL Basics

Master the essential SQL query operations and syntax.

9 Lessons
7 Challenges

Lessons

SELECT Fundamentals
Aliases and Constants
Expressions in SELECT
Selecting DISTINCT Values
Filtering with WHERE
Sorting with ORDER BY
Limiting Results with LIMIT
Handling NULL Values
Comments

Exercises

Basic Queries Quiz
Projection Challenge
Select Expression
Select Unique
Logical Operators
Sorting Challenge
Sorting and Limiting
Sorting and Filtering

3. Manipulating Data

Learn how to modify and manipulate data in your database.

3 Lessons
3 Challenges

Lessons

INSERT Operations
UPDATE Operations
DELETE Operations

Exercises

Data Manipulation Quiz
Inserting Customers
Updating Bookstore
Deleting Books

4. Defining Tables

Master database schema design and table management.

9 Lessons
7 Challenges

Lessons

Creating Tables
Data Types in SQLite
Common Data Types
More on Numeric Types
Temporal Data Types
CHECK Constraints
Primary Key Constraint
Modifying Tables
Dropping and Truncating

Exercises

Defining Tables Quiz
Simple Table Creation
Data Types Challenge
Constraints Challenge
Temporal Validation
Sales Data Analysis
Modifying Tables
Removing Table Data

5. Multi-Table Queries

Learn to work with multiple tables using JOINs and relationships.

7 Lessons
10 Challenges

Lessons

More on Relational Data
Relationships and Types
JOINs in Queries
Self Joins and Usecases
Foreign Key Constraint
Set Operator Queries
Views and Virtual Tables

Exercises

Multi-Table Queries Quiz
Inactive Customers
Recent 3 Orders
High Value Orders
Specific Book Customers
Referred Customers
Readers Like You
Same Price Books
Multi-Section Authors
Expensive Books
Trending Tech Books

6. Aggregate Functions

Analyze and summarize data using SQL's powerful aggregation features.

4 Lessons
10 Challenges

Lessons

What is Aggregation?
Basic Aggregation
Grouping Data
Grouping and Filtering

Exercises

Aggregate Queries Quiz
Book Sales Summary
Category Insights
Author Tier Analysis
Author Book Stats
Daily Sales Report
Publisher Stats
High Value Publishers
Premium Authors
Sales Analysis
Employee Performance

7. Scalar Functions

Master built-in functions for data transformation and manipulation.

6 Lessons
5 Challenges

Lessons

What are they?
String Functions
Numeric Functions
Date Functions
Conversion Functions
Logical Functions

Exercises

Scalar Functions Quiz
Customer Contact List
Membership Duration
Book Performance
Book Categories
Monthly Sales Analysis

8. Subqueries and CTEs

Write complex queries using subqueries and common table expressions.

4 Lessons
6 Challenges

Lessons

What are Subqueries?
Correlated Subqueries
Common Table Expressions
Recursive CTEs

Exercises

Subqueries Quiz
Books Above Average
Latest Category Books
Low Stock by Category
Bestseller Rankings
New Customer Analysis
Daily Sales Report

9. Window Functions

Advanced analytics and calculations using window functions.

5 Lessons
7 Challenges

Lessons

What are they?
OVER and PARTITION BY
Use of ORDER BY
Ranking Functions
Window Frames

Exercises

Window Functions Quiz
Basic Sales Metrics
Bestseller Comparison
Author Category Sales
Top Authors
Price Tier Rankings
Month-over-Month Sales
Price Range Analysis
About the Author

I am Kamran Ahmed, an engineering leader with over a decade of experience in the tech industry. Throughout my career I have built and scaled software systems, architected complex data systems, and worked with large amounts of data to create efficient solutions.

I am also the creator of roadmap.sh, a platform trusted by millions of developers to guide their learning journeys. I love to simplify complex topics and make learning practical and accessible.

In this course, I will share everything I have learned about SQL from the basics to advanced concepts in a way that is easy to understand and apply. Whether you are just starting or looking to sharpen your skills, you are in the right place.

Frequently Asked Questions

Find answers to common questions about the course below.

Master SQL Today

Get instant lifetime access