SQL: better questions for your data
Practice SQL with joins, transactions, window functions, and reconciliation. Interpret frames, rankings, weighted means, and NULL states through concrete examples.
Objectives and progression
Eight lessons, 60 regular questions, and 14 original cases develop SQL reasoning using PostgreSQL 18 reference semantics. New lessons connect window functions, sparse series, metric populations, and reconciliation to fictional support and operations work. Examples distinguish calculation, grain, identity, and presentation order with predicted results and explanations of alternatives. The final assessment reuses 44 decisions in 75 minutes. Executable checks cover only a portable SQLite subset; they do not establish PostgreSQL execution, plans, or performance. Further deepening, validation on that engine, and independent review remain pending.
Audience: L2/L3 support, development, data analysis teams, and technical managers who need to interpret queries and changes.
Prerequisites: Familiarity with tables, rows, and columns. Basic application knowledge helps; production access is not required.
327 estimated study minutes
- Interpret NULL, ordering, and filters using explicit samples.
- Preserve population and grain in joins and metrics.
- Connect transactions, constraints, and concurrency conflicts.
- Assess plans and recovery using evidence and clear limits.
- Choose partitions, tie-breaks, and frames matching each row’s unit.
- Distinguish a missing row, unknown amount, and known difference in reconciliation.
- Check denominators and retain identity when combining metrics and relationships.
Modules
- Query with intent
- Join without multiplying mistakes
- Count and group carefully
- Changes that preserve rules
- Indexes and execution plans
- Concurrency and safe updates
- Window functions and operational series
- Reconciliation, metrics, and query diagnosis
Continue learning
References and version
PostgreSQL 18 reference semantics; DR SQL 2026.2
- PostgreSQL 18: Comparison Functions and Operators · 2026-10-01
- PostgreSQL 18: Sorting rows · 2026-09-29
- PostgreSQL 18: Table Expressions · 2026-10-01
- PostgreSQL 18: Aggregate Functions · 2026-10-01
- PostgreSQL 18: Subquery Expressions · 2026-10-01
- PostgreSQL 18: Transactions · 2026-09-29
- PostgreSQL 18: Constraints · 2026-09-29
- PostgreSQL 18: Introduction to indexes · 2026-09-29
- PostgreSQL 18: Using EXPLAIN · 2026-09-29
- PostgreSQL 18: Transaction isolation · 2026-09-29
- PostgreSQL 18: Explicit locking · 2026-09-29
- PostgreSQL 18: UPDATE · 2026-09-29
- PostgreSQL 18: Window Functions · 2026-10-01
- PostgreSQL 18: Window Function Tutorial · 2026-10-01
- PostgreSQL 18: Value Expressions · 2026-10-01
- PostgreSQL 18: WITH Queries · 2026-10-01
- PostgreSQL 18: Combining Queries · 2026-10-01
- PostgreSQL 18: Mathematical Functions and Operators · 2026-10-01
What you will explore
0 / 8Query with intent
Select columns, filter rows, and define explicit ordering.
Join without multiplying mistakes
Understand cardinality and row preservation.
Count and group carefully
Choose the measure and result granularity.
Changes that preserve rules
Use transactions, constraints, and execution plans deliberately.
Indexes and execution plans
Connect data access, selectivity, and maintenance cost.
Concurrency and safe updates
Avoid lost changes and distinguish transactions from safe repetition.
Window functions and operational series
Retain detail, choose rankings, define frames, and check the population before interpreting a metric.
Reconciliation, metrics, and query diagnosis
Retain identity and population when combining data, calculating metrics, and investigating differences between query stages.