Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyMongoDBsingle-field indexesSingle-choice MCQ

You created an index with db.users.createIndex({ age: 1 }). Can this same index help a query that sorts by age descending?

db.users.find().sort({ age: -1 })