Paste your SQL below. We execute both the original and your rewrite against a real 1.5M-row DuckDB database and return actual timing. No simulations. No keyword matching. The database is the judge.
Select a task on the left, then click Load Verified Sample Solution to auto-fill a tested SQL rewrite.
Schema quick ref:
users: id, email, tier, region, plan, created_at
orders: id, customer_id, product_id, status, total, created_at
events: id, user_id, session_id, event_type, occurred_at
โ ๏ธ Common gotchas:
โข events uses occurred_at (not created_at)
โข users uses tier (not status)
โข Task 3: original WHERE returns all 1M rows (sess_ matches all)