sort, limit and skip
Order and page results.
Example
db.users.find().sort({ age: -1 }).limit(5)
db.users.find().skip(10).limit(10)Exercise
Descending.
sort({ age: })
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.