A complete, project-based SQL learning path for absolute beginners to advanced database professionals
This comprehensive SQL training program takes you from absolute beginner to advanced database professional. Learn SQL using Microsoft SQL Server through hands-on exercises, real-world projects, and industry best practices.
- Fundamentals: Database concepts, SQL syntax, basic queries
- Data Manipulation: INSERT, UPDATE, DELETE, and transaction management
- Advanced Queries: Joins, subqueries, set operations, CTEs
- Performance: Indexing, query optimization, execution plans
- Database Design: Normalization, constraints, relationships
- Advanced Features: Views, stored procedures, triggers, analytics
- Real-World Skills: Projects simulating actual business scenarios
Learn by doing! Every lesson now includes practical .sql files you can run on your own SQL Server:
- π§ Setup Scripts: One-click database setup
- π Example Scripts: Working code for every concept
- π― Exercise Scripts: Hands-on practice with solutions
- β Run & Learn: Execute on your system, see real results
π See HOW-TO-USE-SCRIPTS.md to get started!
- β Complete Beginners - No prior SQL or database experience needed
- β Developers - Add SQL skills to your programming toolkit
- β Data Analysts - Master data querying and analysis
- β Database Administrators - Learn administration and optimization
- β Students - Build a strong foundation for career advancement
Set up your complete SQL learning environment
- Installation Guide - Install SQL Server and client tools
- Database Setup - Create sample databases (Sakila, HR)
- Tools Overview - Master SSMS, Azure Data Studio, VS Code
Time: 1-2 hours | Difficulty: Beginner
01 - Lessons - New 3-Level Progressive Learning Path
π’ BEGINNER LEVEL
Duration: ~1 hour 44 minutes | 5 Lessons
Master the fundamentals of SQL and database operations.
| # | Lesson | Duration | What You'll Learn |
|---|---|---|---|
| 1 | Intro to SQL | 15 min | What SQL is, why databases matter, RDBMS concepts |
| 2 | Setup Environment | 12 min | SQL Server setup, tools (SSMS/Azure Data Studio) |
| 3 | Query Data | 58 min | SELECT, WHERE, ORDER BY, basic filtering |
| 4 | DDL Commands | 11 min | CREATE, ALTER, DROP tables and databases |
| 5 | DML Commands | 24 min | INSERT, UPDATE, DELETE, basic transactions |
After completing: You'll be able to create databases, tables, and perform CRUD operations.
π‘ INTERMEDIATE LEVEL
Duration: ~10 hours | 14 Lessons
Advanced querying, functions, and analytical techniques.
| # | Lesson | Duration | What You'll Learn |
|---|---|---|---|
| 1 | Filtering Data | 40 min | Advanced WHERE, BETWEEN, IN, LIKE, NULL handling |
| 2 | SQL Joins - Basics | 40 min | INNER JOIN, table aliases, multi-table joins |
| 3 | SQL Joins - Advanced | 35 min | LEFT/RIGHT/FULL/CROSS, SELF JOIN, APPLY |
| 4 | Set Operators | 45 min | UNION, INTERSECT, EXCEPT |
| 5 | String Functions | 26 min | UPPER, LOWER, TRIM, SUBSTRING, CONCAT |
| 6 | Numeric Functions | 4 min | ROUND, CEILING, FLOOR, ABS, POWER |
| 7 | Date & Time Functions | 96 min | GETDATE, DATEADD, DATEDIFF, formatting |
| 8 | NULL Functions | 32 min | COALESCE, ISNULL, NULLIF, three-valued logic |
| 9 | CASE Expressions | 38 min | Searched/Simple CASE, conditional logic |
| 10 | Aggregate Functions | 75 min | COUNT, SUM, AVG, GROUP BY, HAVING |
| 11 | Window Functions - Basics | 57 min | OVER(), PARTITION BY, running totals |
| 12 | Window Functions - Aggregates | 52 min | Window frames, moving averages, ROWS vs RANGE |
| 13 | Window Functions - Ranking | 68 min | ROW_NUMBER, RANK, DENSE_RANK, NTILE |
| 14 | Window Functions - Value | 74 min | LAG, LEAD, FIRST_VALUE, LAST_VALUE |
After completing: You'll master complex queries, analytics, and data transformations.
οΏ½ ADVANCED LEVEL
Duration: ~10 hours | 12 Lessons
Professional database development, optimization, and administration.
| # | Lesson | Duration | What You'll Learn |
|---|---|---|---|
| 1 | Subqueries | 45 min | Scalar, row, table subqueries; EXISTS, correlated |
| 2 | CTEs | 52 min | Common Table Expressions, recursive CTEs |
| 3 | Views | 38 min | Creating views, indexed views, security |
| 4 | Stored Procedures | 65 min | Parameters, error handling, business logic |
| 5 | Functions (UDFs) | 42 min | Scalar, inline, multi-statement functions |
| 6 | Triggers | 48 min | DML/DDL triggers, audit logging |
| 7 | Indexes & Performance | 72 min | Clustered/non-clustered indexes, design strategies |
| 8 | Execution Plans | 58 min | Reading plans, query tuning |
| 9 | Transactions Deep Dive | 55 min | ACID, isolation levels, deadlock prevention |
| 10 | Query Optimization | 68 min | Performance tuning, hints, statistics |
| 11 | Partitioning & Sharding | 50 min | Table partitioning, scalability patterns |
| 12 | Advanced Analytics | 47 min | Modern SQL, BI integration, big data |
After completing: You'll be ready for production database development and DBA roles.
The original sequential 18-chapter structure is preserved in the archive folder for reference. See CONTENT-MIGRATION-MAP.md for how content was reorganized into the new 3-level structure.
Practice problems for each chapter with solutions
- π Chapter-by-chapter exercises (18 chapters)
- π‘ Difficulty levels: Easy, Medium, Hard
- β Solutions provided with explanations
- π― Progressive difficulty building on previous concepts
Time: 20-30 hours | Skill Development: Essential
Supporting materials and resources
- Cheatsheets - Quick reference guides
- ER Diagrams - Visual database schemas
- SQL Scripts - Reusable code templates
Real-world projects to solidify your skills
Design and implement a complete library database with book tracking, member management, and lending functionality.
Skills: Database design, CRUD operations, relationships, basic queries
Time: 6-8 hours | Difficulty: Beginner-Intermediate
Analyze sales data, customer behavior, and product performance for an online store using advanced queries and analytics.
Skills: Complex joins, aggregations, window functions, reporting
Time: 8-10 hours | Difficulty: Intermediate-Advanced
Build an HR database with organizational hierarchy, payroll calculations, and employee analytics.
Skills: Self-joins, recursive queries, calculated fields, views
Time: 8-10 hours | Difficulty: Intermediate
Create a comprehensive sales reporting system with dashboards, KPIs, and time-based analysis.
Skills: Complex aggregations, pivoting, stored procedures, optimization
Time: 10-12 hours | Difficulty: Advanced
Total Project Time: 32-40 hours
- Computer: Windows, Mac, or Linux
- RAM: Minimum 4GB (8GB recommended)
- Disk Space: 10GB for SQL Server and sample databases
- Time Commitment: 2-5 hours per week recommended
-
Install SQL Server
# Download from: https://www.microsoft.com/sql-server/sql-server-downloads # Choose Developer or Express edition (free)
-
Install a SQL Client
- Windows: SQL Server Management Studio (SSMS)
- Cross-platform: Azure Data Studio
-
Set Up Sample Databases
-- Follow instructions in 00-getting-started/02-database-setup.md CREATE DATABASE Sakila;
-
Test Your Setup
SELECT @@VERSION; SELECT * FROM sys.databases;
-
Start Learning
- Begin with 00-getting-started
- Then proceed to 01-lessons/01-background
Goal: Understand databases and write basic queries
- Complete Getting Started setup
- Chapters 1-3: Background, Creating Databases, Query Primer
- Exercises for Chapters 1-3
- Project 1: Library Management System
Outcome: Can create databases, tables, and write SELECT queries with filtering and sorting
Goal: Master complex queries and data manipulation
- Chapters 4-9: Filtering, Joins, Sets, Functions, Grouping, Subqueries
- Exercises for Chapters 4-9
- Project 2: E-Commerce Analysis
- Project 3: Employee Database
Outcome: Can write complex multi-table queries with aggregations and subqueries
Goal: Optimize performance and use advanced features
- Chapters 10-18: Advanced Joins, Transactions, Indexes, Views, Analytics, Big Data
- Exercises for Chapters 10-18
- Project 4: Sales Reporting System
- Performance tuning and optimization
Outcome: Can design efficient databases, optimize queries, and use advanced SQL features
- Practice Daily - Even 30 minutes a day is better than cramming
- Type Every Query - Don't copy-paste; muscle memory matters
- Experiment - Modify examples to see what happens
- Use Test Data - Practice on sample databases, not production!
- Read Execution Plans - Understand how queries actually run
- Document Your Learning - Keep a notebook or blog
- Pomodoro Technique: 25 min study + 5 min break
- Active Recall: Try to write queries from memory
- Spaced Repetition: Review older topics regularly
- Teach Others: Explain concepts to solidify understanding
- Build Projects: Apply skills to real-world scenarios
- β Skipping foundational concepts
- β Not practicing regularly
- β Copy-pasting without understanding
- β Ignoring error messages
- β Not learning to read execution plans
- β Forgetting to back up databases
| Tool | Platform | Purpose | Cost |
|---|---|---|---|
| SQL Server 2022 | All | Database Engine | Free |
| SSMS | Windows | Primary IDE | Free |
| Azure Data Studio | All | Modern IDE | Free |
| VS Code + mssql | All | Lightweight Editor | Free |
| DBeaver | All | Universal Client | Free |
- π Documentation: Microsoft SQL Server Docs
- π₯ Videos: SQL Server YouTube Channel
- π¬ Community: Stack Overflow SQL Server
- π Blogs: SQL Server Central
- π Practice: LeetCode SQL
This course primarily uses the Sakila database, a sample database modeling a DVD rental store.
Tables:
actor- Movie actorsfilm- Film catalogcustomer- Store customersrental- Rental transactionspayment- Payment recordsinventory- Store inventory- And more...
Features:
- Realistic business scenario
- Complex relationships
- Multiple data types
- Industry-standard schema
Schema Diagram: See 03-assets/er-diagrams/sakila-schema.png
- β Write complex SQL queries for data retrieval and analysis
- β Design normalized database schemas
- β Optimize query performance with indexes
- β Implement transactions and maintain data integrity
- β Use advanced features (views, stored procedures, triggers)
- β Analyze and troubleshoot database issues
- β Work with real-world business scenarios
- Database Administrator (DBA) - $90k-$130k
- Data Analyst - $70k-$110k
- Backend Developer - $80k-$140k
- Data Engineer - $100k-$150k
- Business Intelligence Developer - $85k-$125k
- Microsoft Certified: Azure Database Administrator Associate
- Microsoft Certified: Data Analyst Associate
- Oracle Database SQL Certified Associate
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- π Report bugs and issues
- π‘ Suggest new exercises or projects
- π Improve documentation
- β¨ Add new features or content
- π Translate content
This project is licensed under the MIT License - see the LICENSE file for details.
- Sakila Database - Originally developed by MySQL AB
- Microsoft - For SQL Server and excellent documentation
- Open Source Community - For tools and resources
- Contributors - Everyone who has contributed to this project
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [Your contact email]
- β Core SQL lessons (18 chapters)
- β Exercise sets for all chapters
- β 4 comprehensive projects
- β Sample databases and scripts
- Video tutorials for each chapter
- Interactive SQL sandbox
- Additional practice databases
- Advanced performance tuning module
- Cloud database integration (Azure SQL, AWS RDS)
- Docker containers for easy setup
- Quiz/assessment system
If you find this course helpful, please give it a star! It helps others discover this resource.
Get Started Now | View Lessons | Try Projects
Made with β€οΈ for the SQL learning community
Last Updated: November 2025