PostgreSQL Course

PostgreSQL is a free, open-source relational database known for taking standards and correctness seriously — and for shipping features other databases treat as add-ons, like a genuine JSON document type, window functions, and a real extension system, as core parts of the engine.

What you'll learn

This course assumes you already know general SQL — SELECT, WHERE, joins, aggregate functions, and the rest — covered in the site's SQL course. Rather than repeating that ground, every lesson here focuses on what's actually distinctive about PostgreSQL: its command-line client psql, a richer type system than plain SQL gives you, reading query plans, storing and querying JSON documents inside a relational table, window functions for running totals and rankings, recursive queries, and how permissions and extensions work.

Every example shows a real query run through psql alongside its exact console output, formatted the way PostgreSQL's own client actually prints results.

Lessons

  1. Introduction
  2. Data Types
  3. Creating Databases & Tables
  4. Indexes & EXPLAIN ANALYZE
  5. JSONB & Semi-Structured Data
  6. Views & Materialized Views
  7. Window Functions
  8. Common Table Expressions
  9. Roles & Permissions
  10. Extensions
Where to start: if you haven't taken the site's SQL course yet, start there first — this course moves quickly past the basics. Once you're comfortable with SELECT, JOIN, and GROUP BY, begin with Introduction and go in order; later lessons on window functions and CTEs lean on the JSONB and views lessons that come before them.