Checkpoint: Preserve Accounts and Bound Graph Walks

Reason about missing accounts, signed balances, duplicate paths, and termination. Select one option per multiple-choice question; use integer-only short answers.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. Account 8 has only pending entries and account 9 has no entries. A LEFT JOIN is followed by WHERE e.status = 'posted'. Which repair preserves both accounts?

Select one answer.

2. Before/on the date cutoff, one account has posted +800, posted +800, posted -350, and pending +900; it also has posted +200 after cutoff. What is balance_cents? Enter one integer.
3. Seed A has edges A->B, A->C, B->C, C->A, C->D, D->E. What is the two-hop result after taking minimum depths?

Select one answer.

4. An unbounded recursive CTE emits (account_id, depth) on a cyclic graph. Why is replacing UNION ALL with UNION insufficient to guarantee termination?

Select one answer.

5. Flagged seeds are P and S. Edges are P->Q, Q->R, R->S, S->R, and R->T. What is the minimum hop depth of T under the two-hop rule? Enter one integer.
6. The ledger exercise uses DATE entry_ts and reports as-of through April 30. A new system stores UTC TIMESTAMPTZ. Which predicate includes all history through April 30 UTC and excludes May 1?

Select one answer.

Join Discord