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 query_id, query_label, and partitions_scanned for queries whose partitions_scanned equals the table's partition count. Order by query_id.
Result columns · in this order
query_id | Stable identifier for the query run. |
query_label | Human-readable name of the query. |
partitions_scanned | How many partitions the run read. |
How to approach it
Compare each run's partitions_scanned to the total partition count from table_partitions.
Sample input
| query_id | query_label | partitions_scanned |
|---|---|---|
| 1 | daily_active_users | 8 |
| 2 | orders_export | 8 |
| 3 | revenue_by_country | 2 |
| 4 | event_funnel | 6 |
| 5 | late_event_audit | 1 |
| 6 | adhoc_select_star | 8 |
6 rows — all rows shown.
| partition_day |
|---|
| 2026-01-01 |
| 2026-01-04 |
| 2026-01-08 |
3 rows — all rows shown.
Expected output
| query_id | query_label | partitions_scanned |
|---|---|---|
| 1 | daily_active_users | 8 |
| 2 | orders_export | 8 |
| 6 | adhoc_select_star | 8 |
3 rows — all rows shown.
Constraints
Compare partitions_scanned to (SELECT COUNT(*) FROM table_partitions). Keep only the equal rows and order by query_id.
Expected skills
Full-scan detection from query history and partition metadata.
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.