Applied edition · 44 planned hours · Unpiloted · Human review pending. Self-review is not a credential; the full 108-hour semester remains unfinished. No browser SQL execution.

Download Markdown

Unit 8 — Deliver an analysis someone can rerun and challenge

Outcome U8: assemble source contracts, saved queries, controls, interpretation and changed-data tests into a reproducible local handoff. Suggested work: ten hours including independent project, later-day transfer and revision; unpiloted. This is a self-study project, not externally graded certification.

1. Reproducibility is more than a screenshot

A screenshot can show a number, but it may not reveal which fixture, filter, query version or runtime produced it. A reproducible handoff lets another reader reconstruct the result from the stated source without guessing. It also exposes limitations rather than burying them in undocumented steps.

Our package uses a fresh in-memory database for each run. schema.sql defines the tables; one fixture supplies records; one saved SELECT describes the output; the runner prints the fixture and SQLite version with the result. Nothing persists in a database between runs. If you edit a query, save it in your learning folder; if you need a result file, redirect output deliberately. Do not assume the runner saved either for you.

Keep original source fixtures unchanged. Record their supplied manifest hashes or calculate your own file hash using an existing tool. A hash detects byte differences; it does not prove the source is accurate, authorized or complete. The provenance note must still say the data are synthetic and explain the analytical population.

2. The worked base analysis has a spine

Begin with controls: six sessions, ten bookings, fourteen booked seats, 7,800 fee cents and six raw intake claims. Raw intake is outside the trusted booking population. Reconcile sums from the grouped output to fourteen seats and eight recorded attended seats. A change in source count should be explained, not patched by changing expected answers until a test passes.

Next, build one row per session using the CTE pattern. The base rows show:

The project view explicitly displays zero additive recorded attended seats when none contributes; it does not imply observed zero attendance. Known seats, unknown seats and denominator-aware rates preserve the difference. Compare this convention with the more literal SUM output retained in Unit 6.

Finally, write a bounded note: booking/capacity is 14/22=63.64%; known-only attendance is 8/11=72.73%; all-booked attendance lies from 8/14 to 11/14 under the stated count assumptions. Check missing attendance for sessions 101 and 103 and the no-booking record for 106 before using the snapshot for planning. Do not infer causes or future demand.

3. Preserve a deliberately wrong query as diagnostic evidence

Run a raw session–registration LEFT JOIN and sum capacity. Session 101 appears three times, 102 twice, 103 twice, 105 three times; childless 104 and 106 each contribute one output row. The sum is 18+8+10+0+12+3=51, not 22. This is a fan-out diagnostic, not a plausible capacity estimate.

SUM(DISTINCT capacity) gives 6+4+5+0+3=18; it incorrectly merges the two separate capacity-four sessions. A correct count beside this sum would not repair the sum. The source-grain open-capacity query gives 22, and the one-row-per-session report preserves that grain. Save the failed query, observed result and explanation in your correction log. Failure evidence is useful when it demonstrates why the final method is needed.

4. A reproducibility test should challenge a definition

Test the equal-fee bookings: source fee sum is 7,800 cents, while DISTINCT fees total only 1,800. Equal amounts are not duplicate identities. Test the unknown-attendance bookings: their seats remain in the all-booked denominator but not the known-only denominator. Test empty input: counts can be zero, rates unavailable. Test deterministic ordering by comparing full ordered outputs, not only their sums.

For delayed transfer, use changed rather than editing the base in place. The query logic should still describe the question without hard-coded IDs or thresholds. A no-booking session and an all-unknown session test different branches. If a result surprises you, inspect intermediate row grains and source controls before adding a cosmetic fix.

A small diagnostic transaction is included in the automated suite: change a disposable attendance value, then roll back and verify the original NULL remains. This illustrates reversibility in a local test. It does not deliver the semester's full correction-workflow and concurrency teaching, and the learner runner intentionally permits SELECT only. Do not execute UPDATE statements on real systems to imitate the demonstration.

5. Handoff and self-review

Follow PROJECT.md for the independent deliverables and the rubric. A complete local attempt includes six artifacts: source/question note, SQL files, observed outputs, control/test log, decision note and reproduction instructions. An executable project requires actual runtime evidence; paper-only reasoning should be labelled as such and can be completed later on a suitable local device.

Ask a reviewer of your own choosing to inspect the work only if you decide to share it; this course neither sends files nor secures external reviewers. Self-check against the explained key after retaining your first attempt. The purpose is diagnosis and revision, not awarding a credential. A numerical self-score cannot substitute for independent competence evidence.

On a later day complete D8 without the model solutions. Keep the changed-data result and a revision memo. This is the end of the bounded applied sequence, not completion of the retained 108-hour semester profile. Scope reconciliation records what remains before that broader course could be claimed.