SQL Practice Logo

SQLPractice Online

Level 7 - ArchitectQuery-Based Questionsm1 indexing strategy

Partition-Pruned Monthly Revenue Query

Interviewer prompt: orders is range-partitioned by order_date. Return total completed revenue for January 2025 while preserving partition pruning.

Schema Context

orders(order_id, order_date, total_amount, status) -- partitioned by order_date