← Quiz: Query Processing and Optimization: all 10 questions
Quiz: Query Processing and Optimization · Question 7 of 10
Which WHERE clause can use an index on orderdate?
Which WHERE clause can use an index on order_date?
- A.WHERE YEAR(order_date) = 2026
- B.WHERE order_date + 1 > '2026-01-01'
- C.WHERE CAST(order_date AS TEXT) LIKE '2026%'
- D.WHERE order_date >= '2026-01-01' AND order_date < '2027-01-01'
Answer & explanation
Correct answer: WHERE order_date >= '2026-01-01' AND order_date < '2027-01-01'
The column is left bare, so the condition is sargable.
Can you get the rest right without peeking?
Take the timed Quiz: Query Processing and Optimization quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →