One lesson
Read a table with SELECT
Permanent access to this lesson and its included learning materials and quiz.
Under Construction
Databases and SQL · 30 lessons · up to 10 minutes each
Thirty authored lessons progress from SELECT and joins through transactions, window functions, and safe parameters, using PostgreSQL syntax.
One-time purchase · USD
Access is attached to your account after payment is verified. No subscription.
One lesson
Permanent access to this lesson and its included learning materials and quiz.
Full category
Permanent access to the lessons published in this track when purchased. Future lessons are not included. 30 of 30 lessons are published; 0 are in owner review and 0 are Coming Soon.
Lessons 1–10
Topic: Read a table with SELECT
Select named columns from a PostgreSQL table and predict the returned rows.
Topic: Shape columns and aliases
Return only needed expressions and label calculated columns with aliases.
Topic: Filter rows with WHERE
Filter a result with comparisons and combine conditions with AND or OR.
Topic: Match sets and ranges
Use IN, BETWEEN, and LIKE when a filter is a set, range, or pattern.
Topic: Sort rows predictably
Order rows by explicit columns and place null values deliberately.
Topic: Page through query results
Use LIMIT and OFFSET with a stable order for a small result page.
Topic: Summarize with aggregates
Use COUNT, SUM, and AVG to summarize a set of rows.
Topic: Group rows and filter groups
Use GROUP BY for aggregate buckets and HAVING for aggregate conditions.
Topic: Join matching records
Use an inner join and an explicit key to combine related rows.
Topic: Keep unmatched rows with LEFT JOIN
Use LEFT JOIN when every row from the left table must remain visible.
Lessons 11–20
Topic: Join three related tables
Join each table through its key and avoid accidental many-to-many multiplication.
Topic: Choose values with CASE
Use CASE to label rows from ordered conditions and include an ELSE case.
Topic: Use a scalar subquery
Use a single-value subquery where a comparison needs a calculated reference.
Topic: Name a query step with a CTE
Use WITH to name a query step and make a multi-stage query easier to read.
Topic: Combine compatible result sets
Use UNION or UNION ALL when two SELECT statements return compatible columns.
Topic: Insert rows with explicit columns
Insert a row using an explicit column list and correctly typed values.
Topic: Update only intended rows
Preview a target set and use a specific WHERE condition before updating.
Topic: Delete rows inside a transaction
Use BEGIN, inspect the affected rows, and COMMIT or ROLLBACK deliberately.
Topic: Handle NULL correctly
Use IS NULL and COALESCE instead of equality comparisons with NULL.
Topic: Protect data with constraints
Use primary keys, foreign keys, unique constraints, and NOT NULL rules.
Lessons 21–30
Topic: Create and query a view
Store a reusable SELECT as a view and query it like a relation.
Topic: Rank rows with a window function
Use ROW_NUMBER with OVER to rank rows without collapsing the result set.
Topic: Partition a window calculation
Use PARTITION BY to restart a window calculation for each group.
Topic: Inspect a query plan
Read EXPLAIN output to identify scans, joins, and estimates before optimizing.
Topic: Understand transaction isolation
Explain what a transaction can observe and choose an isolation level intentionally.
Topic: Avoid conflicting updates
Use row locks and short transactions to coordinate concurrent changes.
Topic: Walk a hierarchy with recursion
Use a recursive CTE with an anchor and recursive term to traverse parent rows.
Topic: Upsert with a unique key
Use PostgreSQL ON CONFLICT to make an insert-or-update operation atomic.
Topic: Normalize related data
Separate repeated facts into keyed tables and join them when you query.
Topic: Parameterize values safely
Pass user input as query parameters instead of concatenating it into SQL text.
Each lesson cites official language documentation and includes a worked example, expected result, practice task, and mapped quiz.
All 30 lesson texts, quizzes, and editable exercises are authored. Isolated code execution still needs a provisioned runtime for this language; no output or score is invented.