🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.WHERE YEAR(order_date) = 2026
  2. B.WHERE order_date + 1 > '2026-01-01'
  3. C.WHERE CAST(order_date AS TEXT) LIKE '2026%'
  4. 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 →