Query lab 35 bonus XP

Find the rows the tracker cannot support

Objectives

The control tracker is a spreadsheet exported to a table. Your manager says the programme is healthy: "filter status to pass and you'll see we're at 100%".

A row is only evidence if it is fresh, owned, and machine-readable. Return the `row_id` of every row that fails any of those three tests: the rows nobody should be quoting in a status report.

Table: tracker

row_id  control_id  owner       days_since_test  status
1       AC-1        ada         12               pass
2       AC-1        ada         210              pass
3       CM-2        unassigned  30               pass
4       EV-3        bob         95               pass
5       EV-4        bob         5                pass (see notes)
6       IA-5        cara        5                pass

Programme rule: a test older than 90 days is stale.
Return one column: row_id.

Checks the server runs (5)

  • Query runs and returns a row_id column
  • Stale tests are flagged
  • Unowned rows are flagged
  • Free-text status values are flagged
  • Exactly the untrustworthy rows

Check names are all you see here: the expectations that decide pass or fail, and the reference solution, stay on the server.

Step-by-step hints

The guided walkthrough, in full. It is free: no XP cost, and it does not touch the paid hint ladder or the reveal gate.

  1. Step 1

    Re-read the brief and name the trap

    The starter is your manager's query and it returns almost the whole sheet. It measures how often people typed a reassuring word, not whether the underlying tests happened.

    You are inverting it: you want the rows that cannot back a claim.

  2. Step 2

    Read the fixture row by row

    Six rows, and each failure mode is present at least once. Two rows are perfectly fine: identify them first so you know what your result must not contain.

    Note the programme rule at the bottom; it gives you the exact staleness boundary and it is not the same as the largest value in the column.

    Query runs and returns a row_id column

  3. Step 3

    Staleness is a numeric comparison

    The freshness column is a number, so compare it with the boundary in the rule. Be careful about whether a row sitting exactly on the boundary should be included: the rule says older than, not at least.

    Stale tests are flagged

  4. Step 4

    Ownership and free text

    One row names no real owner; the sheet uses a placeholder word for that. Match on it.

    One row's status is prose that happens to start with the right word. Rather than enumerating every way a human can decorate a cell, ask which rows are exactly equal to the accepted value and treat everything else as suspect.

    Unowned rows are flaggedFree-text status values are flagged

  5. Step 5

    Combine without over-matching

    Join your three conditions so any single one is enough. Then check your result against the two rows you decided were fine at the start: if either appears, one condition is too broad.

    Exactly the untrustworthy rows

Rules summary

  • XP on pass

    35 bonus XP the first time every check goes green.

  • Paid hints

    2 available. Each costs 25% of the lab XP (about 9 XP).

  • Reveal solution

    Scores 0 XP and unlocks only after 3 check runs.

  • Attempt cap

    60 check runs per learner. The runner warns you in the last 10.

  • Drafts

    Your editor content is saved in this browser, so a reload will not lose work.

  • Walkthrough

    Always free and never penalised: use it before spending a hint.