The SQL course that goes all the way. From first SELECT to vector search for AI — including CTEs, window functions, indexes, and production operations.
Free forever · No credit card · No spam
-- Day 3: Window functions for running totals SELECT order_date, revenue, SUM(revenue) OVER ( ORDER BY order_date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) AS running_total, AVG(revenue) OVER ( ORDER BY order_date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW ) AS moving_avg_7d FROM orders;
JOINs are 20% of what you'll actually write. Window functions, CTEs, JSONB, and pgvector cover the rest — and most courses never get there.
Window functions are the most powerful SQL feature almost nobody teaches. Day 3 covers running totals, rankings, and moving averages that replace 50-line subqueries.
Day 4 installs the pgvector extension and shows you how to store embeddings and run similarity search — the foundation of every RAG application.
Day 5 covers backups, connection pooling with PgBouncer, monitoring with pg_stat_statements, and the index strategies that keep queries fast at scale.
Install PostgreSQL and psql. Create your first database, define tables, and write real queries. SELECT with WHERE, ORDER BY, LIMIT. INSERT, UPDATE, DELETE.
Write INNER, LEFT, and RIGHT JOINs across multiple tables. Understand query plans with EXPLAIN ANALYZE. Add indexes and watch queries go from slow to instant.
Write CTEs to break complex queries into readable steps. Use window functions for running totals, rankings, and moving averages. Store and query semi-structured data with JSONB.
Install the pgvector extension. Store text embeddings. Run similarity search to find the most relevant documents. This is the foundation of every RAG system.
Set up automated backups and point-in-time recovery. Monitor slow queries with pg_stat_statements. Add PgBouncer for connection pooling.
All 5 days free. Forever. No paywall.
No spam. No credit card. Or go straight to Day 1.
Three days of intensive, hands-on AI training. Build production systems with real data, real APIs, and a cohort of peers. $1,490 all-in. Coming to 5 cities in October 2026.