Covering index idea
SQL
Medium
2 views
Problem Description
Query needs only (order_date, total_amount) for reports. Create an index that helps covering these columns.
Output Format
DDL statement(s)
Sample Test Case
Input:
Orders(order_date, total_amount)
Constraints
DB may or may not use covering; still good practice
Official Solution
CREATE INDEX idx_orders_date_amount ON Orders(order_date, total_amount);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!