Overview
SQL (Structured Query Language) is the standard language for relational database management systems. It is used for storing, manipulating, and retrieving data in databases like PostgreSQL, MySQL, SQLite, and Microsoft SQL Server.
Key Features
- Declarative syntax — Describe the result, not the steps
- ACID compliance — Transactions with atomicity, consistency, isolation, durability
- Joins — Combine data across multiple tables relationally
- Window functions — Advanced analytics (ranking, running totals)
- Ubiquitous — Every major RDBMS supports SQL
Code Example
sql
Learning Resources
Learning Path
13 topics across 4 sections
1Basics
- Introduction to SQL — Relational model, RDBMS, and SQL dialects
- SELECT Queries — SELECT, WHERE, ORDER BY, LIMIT, and DISTINCT
- Filtering & Sorting — Comparison operators, LIKE, IN, BETWEEN, and NULL handling
- Aggregate Functions — COUNT, SUM, AVG, MIN, MAX, and GROUP BY / HAVING
2Joins & Relationships
- Joins — INNER, LEFT, RIGHT, FULL OUTER, CROSS, and self joins
- Subqueries — Scalar, row, and table subqueries, correlated subqueries
- Set Operations — UNION, INTERSECT, EXCEPT, and their ALL variants
3DDL & DML
- Table Management — CREATE TABLE, ALTER, DROP, constraints, and indexes
- Data Manipulation — INSERT, UPDATE, DELETE, and MERGE/UPSERT
- Transactions — BEGIN, COMMIT, ROLLBACK, and ACID properties
4Advanced
- Window Functions — ROW_NUMBER, RANK, LAG, LEAD, and OVER (PARTITION BY)
- CTEs & Recursive Queries — WITH clause, recursive CTEs, and hierarchical data
- Views & Stored Procedures — CREATE VIEW, functions, triggers, and procedural SQL