Sign in to run and submit your work
Reading is open to everyone. Running code and saving drafts need an account so your work is yours and comes back on your next visit.
or
CODE WORKSPACE
Return exactly load_action and rows, counting actions from the deduped staged batch compared to dim_customer_current.
Result columns · in this order
load_actionrowsHow to approach it
Create the same action plan used before a MERGE, then aggregate by load_action.
Sample input
| customer_id | load_action |
|---|---|
| 101 | update |
| 102 | insert |
| 103 | delete |
| 104 | update |
| 105 | unchanged |
| 106 | insert |
6 rows — all rows shown.
Expected output
| load_action | rows |
|---|---|
| delete | 1 |
| insert | 2 |
| unchanged | 1 |
| update | 2 |
4 rows — all rows shown.
Constraints
Dedupe staged rows, ignore NULL customer_id rows, classify insert, update, delete, and unchanged actions, then group by load_action and order alphabetically.
Expected skills
Operational load receipts, action counts, and reconciliation output.
Submit for review to find out what your query gets right, what it gets wrong, and how it compares with the best working query for this exercise.
This scenario runs a full workspace — editor, canvas and results side by side. It needs a laptop or desktop to be usable. Open this page on a bigger screen to start building.