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 check_name, failing_rows, and status for duplicate_snapshot_keys, line_item_total_mismatches, missing_country_customers, and orders_without_items.
Result columns · in this order
check_namefailing_rowsstatusHow to approach it
Build each check independently, then union the evidence rows.
Sample input
| check_name | example_failing_rows |
|---|---|
| duplicate_snapshot_keys | 2 |
| missing_country_customers | 1 |
| orders_without_items | 5 |
| line_item_total_mismatches | 4 |
4 rows — all rows shown.
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 |
4 rows — all rows shown.
Constraints
Each check should return one scalar count. Stack checks with UNION ALL, label pass when failing_rows = 0 else fail, and order by check_name.
Expected skills
Composing interview-ready data-quality evidence.
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.