⚡ Learn SQL Database & Querying
SQL (Structured Query Language) is the global standard language for relational database management systems. It enables software engineers, data analysts, and backend developers to design database schemas, enforce relational integrity via Primary and Foreign Keys, write efficient data queries, perform complex multi-table joins, build analytical reports, and optimize performance.
🟢 Beginner to Advanced: Start with database setup and table design, master Primary/Foreign Keys and CRUD operations, learn advanced filtering, grouping, and multi-table Joins, then build advanced analytical queries using Subqueries, CTEs, Window Functions, Views, Indexes, Transactions, JSON Data, and Stored Procedures.
📖 What You Will Learn
- Relational database architecture, DBMS components, and SQL execution order
- Creating databases and tables with
CREATE DATABASEandCREATE TABLE - Data types (
INT,VARCHAR,DECIMAL,DATE,TIMESTAMP) andNULLhandling - Enforcing schema integrity using
PRIMARY KEY,FOREIGN KEY,NOT NULL,UNIQUE,CHECK, andDEFAULT - Inserting records into parent and child tables safely using
INSERT INTO - Reading, querying, filtering, and sorting records with
SELECT,WHERE,ORDER BY, andLIMIT - Multi-condition logical operators (
AND,OR,NOT,BETWEEN,IN,LIKE) - Modifying and removing table records safely with
UPDATEandDELETE - Aggregate functions (
COUNT,SUM,AVG,MIN,MAX) and handlingNULLs withCOALESCE - Summarizing data using
GROUP BYand filtering aggregated groups usingHAVING - Combining relational data using
INNER,LEFT,RIGHT,FULL, andCROSSjoins - Built-in string, numeric, date/time, and type-conversion functions
- Conditional logic with
CASEexpressions inSELECT,ORDER BY, and aggregations - Modular query design using Subqueries, CTEs (
WITHclause), and Recursive CTEs - Set operations (
UNION,UNION ALL,INTERSECT,EXCEPT) - Database normalization standards (1NF, 2NF, 3NF) and ER relationship design
- Creating Virtual Views and Materialized Views for reporting and security abstraction
- B-Tree Indexes, query execution plans (
EXPLAIN ANALYZE), and query optimization - Transaction management (
BEGIN,COMMIT,ROLLBACK) and ACID properties - Advanced analytical queries using SQL Window Functions (
OVER,PARTITION BY,ROW_NUMBER,RANK) - Working with
JSONandJSONBsemi-structured data inside relational database columns - Database automation using Stored Procedures, Functions, Triggers, and Security Grants
- Real-world capstone SQL projects and database administration scripts
📚 Complete Lesson Index
| # | Topic | Level | Link |
|---|---|---|---|
| 01 | Set Up SQL Environment | 🟢 Beginner | Open lesson |
| 02 | Introduction to SQL & Databases | 🟢 Beginner | Open lesson |
| 03 | Database & Table Basics (CREATE, ALTER, DROP) |
🟢 Beginner | Open lesson |
| 04 | SQL Data Types & NULL Values | 🟢 Beginner | Open lesson |
| 05 | Database Keys (Primary, Foreign, Composite, Candidate & Surrogate Keys) | 🟢 Beginner | Open lesson |
| 06 | INSERT – Adding Data to Tables with Keys |
🟢 Beginner | Open lesson |
| 07 | SELECT – Reading & Querying Data |
🟢 Beginner | Open lesson |
| 08 | Filtering Data with WHERE |
🟢 Beginner | Open lesson |
| 09 | Operators in SQL | 🟢 Beginner | Open lesson |
| 10 | Sorting & Limiting Results (ORDER BY, LIMIT) |
🟢 Beginner | Open lesson |
| 11 | UPDATE & DELETE – Modifying Data |
🟢 Beginner | Open lesson |
| 12 | Aggregate Functions (COUNT, SUM, AVG, MIN, MAX) |
🟡 Intermediate | Open lesson |
| 13 | GROUP BY & HAVING Clauses |
🟡 Intermediate | Open lesson |
| 14 | SQL Joins & Table Relationships | 🟡 Intermediate | Open lesson |
| 15 | SQL Built-in String, Numeric & Date Functions | 🟡 Intermediate | Open lesson |
| 16 | Conditional Logic with CASE |
🟡 Intermediate | Open lesson |
| 17 | Subqueries & Nested Queries | 🟡 Intermediate | Open lesson |
| 18 | Set Operations (UNION, INTERSECT, EXCEPT) |
🟡 Intermediate | Open lesson |
| 19 | Database Relationships & Normalization (1NF–3NF) | 🟡 Intermediate | Open lesson |
| 20 | Views & Virtual Tables | 🟡 Intermediate | Open lesson |
| 21 | Indexes & Query Performance (EXPLAIN) |
🔴 Advanced | Open lesson |
| 22 | Transactions & ACID Properties | 🔴 Advanced | Open lesson |
| 23 | Common Table Expressions (CTEs) | 🔴 Advanced | Open lesson |
| 24 | Recursive CTEs & Hierarchical Data | 🔴 Advanced | Open lesson |
| 25 | SQL Window Functions (OVER, PARTITION BY) |
🔴 Advanced | Open lesson |
| 26 | Stored Procedures & Functions | 🔴 Advanced | Open lesson |
| 27 | Triggers & Automated Events | 🔴 Advanced | Open lesson |
| 28 | SQL Security, Roles & Permissions | 🔴 Advanced | Open lesson |
| 29 | Working with JSON Data in Relational SQL (JSON & JSONB) |
🔴 Advanced | Open lesson |
| 30 | Practical SQL Capstone Projects | 🔴 Advanced | Open lesson |
🎯 Suggested Learning Flow
01–05 Database Design & Keys $\rightarrow$ 06–11 CRUD Operations & Query Filtering $\rightarrow$ 12–14 Aggregation & Joins $\rightarrow$ 15–19 Functions, Subqueries & Normalization $\rightarrow$ 20–22 Views, Indexes & Transactions $\rightarrow$ 23–25 CTEs & Window Functions $\rightarrow$ 26–29 JSON Data, Procedures, Triggers & Security $\rightarrow$ 30 Capstone Projects
🧭 Navigation
| ← Repository Home | Start with Lesson 01 → |