sqlEASYSQL
Warm up with query plan index choice
Easy SQL arena: index selectivity, WHERE clauses, and explain-plan reasoning
XP reward
110
Coins
9
Target time
24m
A dashboard query regressed after data growth and the team needs a safer index proposal. You are working inside an analytics warehouse, and the arena only clears when the result is safe, deterministic, and explainable.
Learning objective
Learn to apply index selectivity, WHERE clauses, and explain-plan reasoning in an analytics warehouse while explaining the invariant, safety constraints, and hidden edge cases.
Mission order
page_views(user_id, path, device, occurred_at) with 600M rows. Implement the direct solution first, then document the one edge case that can break it. Submit the solution plus enough reasoning to pass hidden edge cases.Visible checks
returns read-only result set
Expected: no mutation statements
uses deterministic ordering
Expected: stable review output
Clear requirements
- Demonstrates index selectivity, WHERE clauses, and explain-plan reasoning
- Handles the visible sample and hidden edge cases
- Keeps output deterministic and explainable
- Stays read-only
Secure validation contract
Judge type
SQL
Complexity target
Readable single-pass aggregate or join
SQL schema
page_views(user_id, path, device, occurred_at) with 600M rows.
Workspace
SQL query console
sqlsafe mock judge
Charging editor core
Test Results
Run the visible checks when your first pass is ready.
Clear Protocol
1Read the scenario and restate the expected output shape.
2Run visible checks before chasing hidden edge cases.
3Use Genie for one nudge if stuck, then explain the invariant.
4Submit only when the result is deterministic and safe.
Rewards
XP
110
Coins
9
Mission Route
Hints
Hints are metered and logged for No Hint Hero runs.
Genie Mentor Core
Hint protocol / contextual guardrails active
Progressive hints
Failed-test aware
Solution guarded
Mission: sql-easy-query-plan-index0 attempts0 failed tests0 hints used
Progressive hint depth
Genie: Genie online. I use your mission, attempts, failed tests, hints, and path context to coach the next rep without dumping answers first.