🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Indexing: all 10 questions

Quiz: Indexing · Question 3 of 10

An index exists on (city, created). Which query can use it best?

An index exists on (city, created). Which query can use it best?

  1. A.WHERE created > '2026-01-01'
  2. B.WHERE city = 'Pune' AND created > '2026-01-01'
  3. C.WHERE amount > 500
  4. D.WHERE YEAR(created) = 2026
Answer & explanation

Correct answer: WHERE city = 'Pune' AND created > '2026-01-01'

It starts with the leftmost column (city), so both parts of the index are used.

Can you get the rest right without peeking?

Take the timed Quiz: Indexing quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →