D8LooPFocus modeCODE WORKSPACE
Return one pass/fail audit evidence table with named quality checks.
Start by naming the output grain, then build CTEs that can be inspected one at a time.
Sample input
| check_name | example_failing_rows |
|---|---|
| duplicate_snapshot_keys | 2 |
| missing_country_customers | 1 |
| orders_without_items | 5 |
| line_item_total_mismatches | 4 |
Expected output
| check_name | failing_rows | status |
|---|---|---|
| duplicate_snapshot_keys | 2 | fail |
| line_item_total_mismatches | 4 | fail |
| missing_country_customers | 1 | fail |
| orders_without_items | 5 | fail |
Constraints
State the output contract first, use readable CTE layers, return the exact columns requested by the prompt, and use deterministic ordering.
Expected skills
Interview clarification, SQL structure, edge-case handling, and final-answer narration.
Run the SQL query to inspect preview rows.