Find approvals without separation of duties Original fictional practice · CC BY 4.0 · 2026-11-11 TASK Return approval_id,requester,resource where requester=approver. Another approval by a different person does not erase the violating row. Sort approval_id. OUTPUT approval_id, requester, resource RULES Return approval_id,requester,resource where requester=approver. Another approval by a different person does not erase the violating row. Sort approval_id. Return exactly the declared columns and order. Money uses integer cents; time and date units follow the task and field dictionary. NULL is unknown and differs from numeric zero. These are original fictional records and exercise policies. Scenario data may be shared with related tasks, whose decisions and output contracts differ. FIELD DICTIONARY grants: id INTEGER — Stable source record identifier; not a row position. principal TEXT — Literal business key or category label. Match exactly and retain NULL where present. resource TEXT — Literal business key or category label. Match exactly and retain NULL where present. effect TEXT — Permission outcome, allow or deny. expires INTEGER — Expiry boundary; the goal declares whether equality is eligible. mask INTEGER — Privacy mask level; higher values require stricter masking. members: member TEXT — Literal business key or category label. Match exactly and retain NULL where present. parent TEXT — Immediate parent identifier, or NULL for a hierarchy root. requests: id INTEGER — Stable source record identifier; not a row position. user TEXT — Literal business key or category label. Match exactly and retain NULL where present. resource TEXT — Literal business key or category label. Match exactly and retain NULL where present. day INTEGER — Integer day index, or ISO YYYY-MM-DD date when stored as text; the task declares cutoff semantics. approvals: id INTEGER — Stable source record identifier; not a row position. requester TEXT — Literal business key or category label. Match exactly and retain NULL where present. approver TEXT — Literal business key or category label. Match exactly and retain NULL where present. resource TEXT — Literal business key or category label. Match exactly and retain NULL where present. METHOD Return approval_id,requester,resource where requester=approver. Another approval by a different person does not erase the violating row. Sort approval_id. For the first output record, approval_id = 1; requester = alice; resource = finance. Inspect the source grain, keys and ties. Compare each result column with the full worked SQL and expected CSV. COMMON WRONG TURN Grouping an approval request and accepting any independent approval loses the original self-approval evidence. RESULT CHECK For the first output record, approval_id = 1; requester = alice; resource = finance. Use setup.sql in a fresh SQLite database and run your own SELECT or WITH. reference.sql and expected.csv contain the full worked answer. All CSVs have UTF-8 headers; empty output fields represent NULL. The browser executes SQLite, not Excel formulas. No spreadsheet function engine is claimed.