SQL Practice Logo

SQLPractice Online

Level 3 - IntermediateDebugging Questions

Debugging: Non-Sargable Date Predicate

Query is slow on indexed created_at. Rewrite it with index-friendly predicate. SELECT id, customer_id FROM orders WHERE DATE(created_at) = '2026-04-01';

Schema Context

orders(id, customer_id, created_at)