D8LooPFocus modeCODE WORKSPACE
Keep one deterministic staged row per customer key before a target merge.
The SQL API will hydrate this workspace with the exercise-specific starter query and schema.
Sample input
| customer_id | tier | is_deleted | updated_at | batch_id | |
|---|---|---|---|---|---|
| 101 | ana@example.com | gold | 0 | 2026-03-05 10:00:00 | 7001 |
| 102 | ben@example.com | silver | 0 | 2026-03-05 11:00:00 | 7001 |
| 103 | cy@example.com | bronze | 1 | 2026-03-05 12:00:00 | 7001 |
| 104 | dee-old@example.com | gold | 0 | 2026-03-05 09:00:00 | 7000 |
| 104 | dee@example.com | platinum | 0 | 2026-03-05 12:30:00 | 7001 |
| 105 | eli@example.com | bronze | 0 | 2026-03-05 08:00:00 | 7001 |
| null | ghost@example.com | silver | 0 | 2026-03-05 13:00:00 | 7001 |
| 106 | fay@example.com | silver | 0 | 2026-03-04 23:30:00 | 6999 |
Expected output
| customer_id | tier | is_deleted | updated_at | batch_id | |
|---|---|---|---|---|---|
| 101 | ana@example.com | gold | 0 | 2026-03-05 10:00:00 | 7001 |
| 102 | ben@example.com | silver | 0 | 2026-03-05 11:00:00 | 7001 |
| 103 | cy@example.com | bronze | 1 | 2026-03-05 12:00:00 | 7001 |
| 104 | dee@example.com | platinum | 0 | 2026-03-05 12:30:00 | 7001 |
| 105 | eli@example.com | bronze | 0 | 2026-03-05 08:00:00 | 7001 |
| 106 | fay@example.com | silver | 0 | 2026-03-04 23:30:00 | 6999 |
Constraints
Load the live SQL exercise to inspect the full prompt, schema, starter query, and expected output.
Expected skills
ROW_NUMBER, Dedupe, Staging
Run the SQL query to inspect preview rows.