Learn PSG — Zero-Threshold Postgres Tutorial
Learn SQL in the browser without installation. Master PostgreSQL fundamentals through 20 interactive lessons.
Course Outline
- What is a Database — Understand the basic concepts of databases, tables, rows, and columns, and what SQL is used for
- Creating Your First Table — Master the CREATE TABLE statement to create tables with different column types
- Inserting Data — Master the INSERT INTO statement to add rows of data to a table
- Querying Data (SELECT Basics) — Master the SELECT statement to read data from tables
- Conditional Queries (WHERE) — Learn to use the WHERE clause to filter rows that meet conditions
- Sorting & Limiting (ORDER BY / LIMIT) — Master sorting and pagination
- Deduplication & Column Calculations (DISTINCT / AS) — Learn to use DISTINCT for deduplication and AS for aliases
- Aggregate Functions (COUNT / SUM / AVG / MAX / MIN) — Master five common aggregate functions
- Grouping (GROUP BY) — Use aggregate functions for grouped statistics
- Filtering Groups with HAVING — Secondary filtering of aggregation results after grouping
- Comprehensive Query Practice — Combine multiple clauses for intermediate-complexity queries
- Introduction to JOIN — Merging Tables — Understand INNER JOIN usage
- LEFT JOIN — Master the difference between LEFT JOIN and INNER JOIN
- Multi-Table JOIN Practice — Queries with three or more tables
- Subqueries — Understand the concept and usage of nested SELECT
- Updating Data (UPDATE) — Master the UPDATE statement
- Deleting Data (DELETE) — Master the DELETE statement and understand the difference from DROP TABLE
- One-to-Many Relationships — Understand one-to-many relationships and foreign key constraints
- Many-to-Many Relationships — Understand many-to-many relationships and junction tables
- Indexes & Transactions (Advanced) — Learn about index optimization and ACID transaction properties
Topics Covered
- SQL basics and database design
- SELECT queries and WHERE condition filtering
- JOIN operations (INNER JOIN, LEFT JOIN)
- Aggregate functions (COUNT / SUM / AVG / MAX / MIN) and GROUP BY
- Subqueries and nested queries
- INSERT / UPDATE / DELETE data operations
- One-to-many and many-to-many relationship design
- Index optimization and ACID transaction properties
Frequently Asked Questions
- How can I learn PostgreSQL without installation?
- This tutorial uses pglite (PostgreSQL compiled to WASM), running directly in the browser with no installation required.
- How long does it take to complete?
- 20 lessons at approximately 5 minutes each — about 100 minutes total to complete the fundamentals.
- Do I need programming experience?
- No. This tutorial is designed for complete beginners, starting from basic database concepts.
- How is data persisted?
- This tutorial uses IndexedDB to store data and SQL operation history. Your progress is preserved across page refreshes.
- What is a JOIN?
- A JOIN combines data from two or more tables. INNER JOIN returns only matching rows, while LEFT JOIN preserves all records from the left table.
Tech stack: PostgreSQL (pglite WASM) + React + TypeScript — no installation needed, runs directly in the browser.
This course requires JavaScript and WebAssembly support for the interactive SQL editor. Course overview: llms.txt | Full content: llm-full.txt | Course index: course-index.json