Free · Self-Paced · Real SQL

PostgreSQL for Developers.
5 Days. Zero Cost.

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

analytics.sql
-- 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;
5
Days to Mastery
pgvector
AI Search
Window
Functions
Production
Ready

Most SQL courses stop at JOINs. This one doesn't.

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

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.

pgvector for AI

Day 4 installs the pgvector extension and shows you how to store embeddings and run similarity search — the foundation of every RAG application.

Production Patterns

Day 5 covers backups, connection pooling with PgBouncer, monitoring with pg_stat_statements, and the index strategies that keep queries fast at scale.

Five days. One complete skill set.

1
Day

Setup and First Queries — SELECT, INSERT, UPDATE

Install PostgreSQL and psql. Create your first database, define tables, and write real queries. SELECT with WHERE, ORDER BY, LIMIT. INSERT, UPDATE, DELETE.

psqlDDLSELECTWHERE60–75 min
2
Day

JOINs, Indexes, and Query Optimization

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.

INNER JOINLEFT JOINEXPLAINIndexes60–75 min
3
Day

Advanced — CTEs, Window Functions, JSONB

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.

CTEsWindow functionsJSONBRankings75–90 min
4
Day

pgvector — Vector Search for AI Applications

Install the pgvector extension. Store text embeddings. Run similarity search to find the most relevant documents. This is the foundation of every RAG system.

pgvectorEmbeddingsSimilarity searchRAG75–90 min
5
Day

Production — Backups, Monitoring, Connection Pooling

Set up automated backups and point-in-time recovery. Monitor slow queries with pg_stat_statements. Add PgBouncer for connection pooling.

pg_dumpMonitoringPgBouncerCloud Postgres75–90 min

Start Day 1 right now.

PostgreSQL for Developers — Free 5-Day Course

All 5 days free. Forever. No paywall.

No spam. No credit card. Or go straight to Day 1.

Ready to Go Deeper?

Finish the free course. Then join the live bootcamp.

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.

DenverLos AngelesNew York CityChicagoDallas