SQL
Complete SQL course: from SELECT and JOIN to window functions, query optimization and database design. Working with PostgreSQL.
What You'll Learn
This Course Includes
Curriculum
30 lessons · 34 lessons · 16 exercises
What Are Databases?
Relational DB, tables, rows, columns, DBMS
- Databases & SQL +10 XP
- SQL Categories +10 XP
Creating Tables
CREATE TABLE, data types, PRIMARY KEY, NOT NULL
- CREATE TABLE +15 XP
INSERT — Adding Data
INSERT INTO, VALUES, multi-insert, RETURNING
- INSERT INTO +10 XP
SELECT — Querying Data
SELECT, WHERE, ORDER BY, LIMIT, DISTINCT
- SELECT Basics +15 XP
UPDATE & DELETE
Updating and deleting data, TRUNCATE, safety
- UPDATE & DELETE +15 XP
Aggregate Functions
COUNT, SUM, AVG, MIN, MAX, GROUP BY, HAVING
- COUNT, SUM, AVG, MIN, MAX +15 XP
JOIN — Joining Tables
INNER, LEFT, RIGHT, FULL, CROSS JOIN
- JOIN Types +15 XP
- JOIN Practice +10 XP
Subqueries
Nested queries, IN, EXISTS, scalar, CTE
- Subqueries +15 XP
String Functions
CONCAT, UPPER, LOWER, TRIM, SUBSTRING, LIKE, ILIKE
- String Functions +10 XP
Date & Time
DATE, TIMESTAMP, INTERVAL, EXTRACT, formatting
- Working with Dates +10 XP
CASE & Conditional Logic
CASE WHEN, COALESCE, NULLIF, conditional aggregates
- CASE WHEN +15 XP
Keys & Relationships
PRIMARY KEY, FOREIGN KEY, 1:1, 1:N, N:N relationships
- Primary & Foreign Keys +15 XP
Indexes
B-tree, CREATE INDEX, composite, partial, EXPLAIN
- Indexes & Performance +10 XP
Views
CREATE VIEW, materialized views, updatable
- Views — Virtual Tables +10 XP
Transactions
BEGIN, COMMIT, ROLLBACK, ACID, isolation levels
- ACID & Transactions +10 XP
Window Functions
ROW_NUMBER, RANK, LAG, LEAD, OVER, PARTITION BY
- Window Function Basics +15 XP
- LAG, LEAD & Frames +10 XP
UNION & Set Operations
UNION, INTERSECT, EXCEPT, combining results
- Set Operations +10 XP
JSONB (PostgreSQL)
Storing JSON, operators, GIN indexes, jsonb_agg
- Working with JSONB +10 XP
Database Normalization
1NF, 2NF, 3NF, denormalization, when to break rules
- Normal Forms +10 XP
Query Optimization
EXPLAIN ANALYZE, execution plans, N+1, best practices
- EXPLAIN & Optimization +10 XP
Stored Procedures
Functions, procedures, PL/pgSQL, triggers
- Functions & Triggers +10 XP
Security
SQL injection, GRANT, REVOKE, roles, RLS
- SQL Security +10 XP
Full-Text Search
tsvector, tsquery, GIN, pg_trgm, ranking
- Text Search in PostgreSQL +10 XP
Recursive Queries
Recursive CTE, hierarchies, trees, graphs
- Recursive CTE +10 XP
Database Design
ER diagrams, schema design, best practices
- Schema Design +15 XP
Migrations & Tools
Migrations, psql, pgAdmin, ORM, Rails migrations
- Migrations & Tools +10 XP
Project: E-Commerce
Designing e-commerce database
- E-Commerce Schema +20 XP
Project: Analytics
Analytics queries with window functions
- Analytics Queries +20 XP
Project: SQL Cheat Sheet
HTML cheat sheet of SQL commands
- SQL Cheat Sheet +20 XP
What's Next?
Career paths, final test
- What's Next After SQL? +10 XP
- Final Quiz +20 XP
Requirements
No prior knowledge required — we start from scratch
Course FAQ
Do I need programming experience?
How do lessons work?
How long does the course take?
Will I get a certificate?
Ready to start?
Sign up for free and start coding right now. Your first result in 5 minutes.
Start Learning