D8LooPFocus modeCODE WORKSPACE
Return only staged rows that should affect the target, excluding unchanged records.
The SQL API will hydrate this workspace with the exercise-specific starter query and schema.
Sample input
| customer_id | stage_tier | target_tier | is_deleted |
|---|---|---|---|
| 101 | gold | silver | 0 |
| 102 | silver | null | 0 |
| 103 | bronze | bronze | 1 |
| 104 | platinum | gold | 0 |
| 105 | bronze | bronze | 0 |
| 106 | silver | null | 0 |
Expected output
| customer_id | tier | is_deleted | load_action | |
|---|---|---|---|---|
| 101 | ana@example.com | gold | 0 | update |
| 102 | ben@example.com | silver | 0 | insert |
| 103 | cy@example.com | bronze | 1 | delete_candidate |
| 104 | dee@example.com | platinum | 0 | update |
| 106 | fay@example.com | silver | 0 | insert |
Constraints
Load the live SQL exercise to inspect the full prompt, schema, starter query, and expected output.
Expected skills
Delta logic, MERGE, CTEs
Run the SQL query to inspect preview rows.