SQL: data reasoning to production
Progress from relational foundations through joins, windows, transactions, schema change, performance, concurrency and trustworthy reporting.
20 units · Web, Plus, Pro · 20 programming subjects + 2 security tracks
Branches show this unit’s authored theory, coding and assessment work.
Unit 1 / 20
A cursor excludes the last seen identity
Exclude the last seen identity and return the next bounded page in a declared deterministic order.
0 prerequisite skills · Reading, guided completion and independent success remain separate evidence.
The course, in order
Open a unit in the map to inspect its activities. Reading, guided completion, independent work and review remain distinct evidence.
- A cursor excludes the last seen identity
Exclude the last seen identity and return the next bounded page in a declared deterministic order.
Open this unit - Bind a lookup and select a nonoverlapping time period
Keep a searched value out of SQL syntax by binding it through a fixed query rather than interpolating its spelling.
Open this unit - Search a literal fragment containing LIKE metacharacters
Escape LIKE metacharacters so a searched fragment is literal data while retaining the intended surrounding wildcard search.
Open this unit - Filter before projecting a stable result
Filter strictly positive scores before projecting IDs, excluding unknown scores and ordering the accepted rows.
Open this unit - Choose one canonical ingestion for each event identity
Select exactly one canonical ingestion per event with a deterministic newest-row and identity tie policy.
Open this unit - Reject invalid stored quantities while allowing lossless SQLite coercion
Enforce stored quantity constraints while accepting SQLite’s declared lossless conversion into a STRICT integer column.
Open this unit - Preserve a blank note while labeling missing data
Replace only SQL NULL with the requested label, preserving empty text, spaces and other present content.
Open this unit - Report exact whole batches and remaining units
Compute whole batches and remaining units under integer division, retaining the declared zero-divisor result.
Open this unit - Nothing is not zero, and nothing does not equal itself
Distinguish row count, known-value count and missing count without treating a stored zero as missing.
Open this unit - Keep every eligibility branch behind its required guard
Place the enabled guard around the entire admin-or-score condition so no OR branch can bypass it.
Open this unit - Keeping every row and summarizing anyway
Keep each detail row while computing region-local running totals and the declared tie-aware rank.
Open this unit - Aggregate the qualifying values in each group
Preserve every observed group while selecting positive contributions inside its aggregate, including groups totaling zero.
Open this unit - A grouped relation can require every named capability
Require both named capabilities using distinct qualifying grants rather than duplicate or unrelated permission counts.
Open this unit - WHERE filters rows, HAVING filters groups
Filter qualifying orders before grouping, then apply the separate aggregate threshold to the resulting groups.
Open this unit - Preserve empty teams while filtering each aggregate independently
Preserve empty parent teams and apply each metric’s eligibility rule inside its own aggregate.
Open this unit - The CASE that must ask about NULL first
Label missing scores explicitly and apply inclusive grade thresholds in descending order.
Open this unit - Name the middle step
Name team-grain totals in a CTE and compare against their average rather than the average underlying expense.
Open this unit - Null replacement must preserve empty text
Substitute the missing-team label only for NULL while preserving present empty text and stable row order.
Open this unit - The predicate the index can actually see
Express a month as a half-open range on the indexed date column and inspect the actual SQLite access plan.
Open this unit - Commit the whole command batch and its delivery intent together
Commit every valid account adjustment and its immutable delivery intent in one owned transaction, rolling the whole batch back on rejection.
Open this unit
