← All learning paths

Typorithm learning path

SQL: analytics and dependable queries

Use subqueries, set operations, windows, time series, safe parameters, plans and reversible transactions. Prerequisite: SQL query foundations. Reviewed 5 November 2026; all accepted and solution queries verified in SQLite and PostgreSQL 18 through the local lab. Windows build gradually; stretches are optional.

16Focused modules
16Lessons to explore
48Typing drills
SQL: analytics and dependable queries course illustration

Study with a practical destination

Use the linked lessons in order, complete the lab and explain the decisions without the reference. Select the path and depth that match your role.

SQL: correct queries and practical analytics

Before starting: No previous SQL is required for query foundations. Complete its row-grain, NULL, join and aggregate lessons before the analytics track. Reading and self-checks work in the app; optional database execution uses a computer and the disposable companion lab.

Build and explain: Write a country-aware report with correct entity counts, observed denominators, explicit ties and reproducible time windows; bind values safely and inspect a local query plan.

  1. 1. Tables, rows and the question behind a query
  2. 2. NULL and three-valued logic
  3. 3. INNER JOIN and relationship cardinality
  4. 4. LEFT JOIN, missing matches and filter placement
  5. 5. Multiple one-to-many joins and honest counts
  6. 6. COUNT, SUM, AVG and observed denominators
  7. 7. Capstone: a country-aware hiring report
  8. 8. EXISTS, NOT EXISTS and nullable anti-joins
  9. 9. ROW_NUMBER and top-N per group
  10. 10. ROWS, RANGE and peer-aware running totals
  11. 11. Calendar scaffolds and justified zero days
  12. 12. Bound values and safe query boundaries
  13. 13. Indexes, EXPLAIN and measured query reasoning
  14. 14. Transactions, conditional changes and rollback evidence
  15. 15. Capstone: one representative role per company

Review evidence: Predict exact identities and values before running a query. Include empty companies, unknown and zero observations, repeated child relationships, tied ordering values and missing days. Reject the intentionally wrong queries and explain their failure. Production concurrency needs its own multi-connection evidence.

Your learning path

0 of 16 lessons completed

Saved on this device

01

Module 1 · 1 lessons

Scalar and correlated subqueries

Compare each observation with the intended global or group-level reference.

0/1 complete
02

Module 2 · 1 lessons

EXISTS, NOT EXISTS and nullable anti-joins

Ask whether a related match exists without accidentally multiplying or poisoning the parent result.

0/1 complete
03

Module 3 · 1 lessons

UNION ALL, UNION and INTERSECT

Choose whether combined populations preserve occurrences or represent distinct membership.

0/1 complete
04

Module 4 · 1 lessons

CTEs and reviewable population pipelines

Name intermediate grains while keeping logical meaning separate from materialization assumptions.

0/1 complete
05

Module 5 · 1 lessons

ROW_NUMBER and top-N per group

Rank an eligible population with a deterministic tie-breaker, then filter the ranked result.

0/1 complete
06

Module 6 · 1 lessons

RANK, DENSE_RANK and intentional peers

Preserve measured-value ties while choosing whether subsequent ranks leave gaps.

0/1 complete
07

Module 7 · 1 lessons

Window aggregates without collapsing detail

Attach group measurements to each retained source identity instead of grouping identities away.

0/1 complete
08

Module 8 · 1 lessons

ROWS, RANGE and peer-aware running totals

Make the intended frame explicit when ordered aggregates encounter equal sort values.

0/1 complete
09

Module 9 · 1 lessons

LAG, changes and the previous observed period

Aggregate to the intended time grain before comparing neighboring observations.

0/1 complete
10

Module 10 · 1 lessons

Calendar scaffolds and justified zero days

Retain requested periods while separating complete-log zero from unknown collection coverage.

0/1 complete
11

Module 11 · 1 lessons

Percentages, numeric division and honest populations

Make the numerator, denominator and rounding policy visible in a share calculation.

0/1 complete
12

Module 12 · 1 lessons

Gaps and islands at the correct calendar grain

Mark sequence breaks only after deduplicating observations to the entity-day grain.

0/1 complete
13

Module 13 · 1 lessons

Bound values and safe query boundaries

Keep user values out of SQL syntax and allowlist identifiers separately.

0/1 complete
14

Module 14 · 1 lessons

Indexes, EXPLAIN and measured query reasoning

Inspect an engine's actual plan without treating a tiny fixture as a production benchmark.

0/1 complete
15

Module 15 · 1 lessons

Transactions, conditional changes and rollback evidence

Verify an atomic unit by inspecting intermediate state and the state after rollback.

0/1 complete
16

Module 16 · 1 lessons

Capstone: one representative role per company

Combine eligibility, tie policy, ranking and empty-company retention in a reviewable report.

0/1 complete