PG
PostgreSQL — Beginner
Learn databases from scratch with PostgreSQL: install it, create tables, add and change data, ask questions with SELECT, connect tables with keys, and summarise data with aggregates. Lessons build one school database step by step — run them in order.
Lessons
- 1Setting up PostgreSQL & psqlInstall PostgreSQL, connect with psql and create your first database.
- 2Creating Tables & Data TypesCREATE TABLE, choosing data types, defaults, NOT NULL and ALTER TABLE.
- 3Inserting, Updating & Deleting DataINSERT rows, see results with RETURNING, change them with UPDATE and remove them with DELETE.
- 4Querying with SELECTFilter, sort, limit and compute with WHERE, ORDER BY, LIMIT, LIKE, IN and NULL checks.
- 5Dates, Times & CASEDate arithmetic, intervals, extracting parts of dates, formatting, and conditional values with CASE.
- 6Keys, Constraints & RelationshipsLink tables with foreign keys and protect data with UNIQUE and CHECK constraints.
- 7Summarising Data: Aggregates & GROUP BYcount, sum, avg, min, max, GROUP BY and HAVING — plus a first look at JOIN.