Built-in Methods
find()
find()// Find all documents in the collection
db.collectionName.find()
// Find documents where the "age" field is greater than 30
db.collectionName.find({ age: { $gt: 30 } })explain()
explain()db.collectionName.find().explain()stats()
stats()db.collectionName.stats()listCommands()
listCommands()getCollectionInfos()
getCollectionInfos()Step 8: Advanced Topics
Aggregating Records
Limiting and Skipping Records in a Single Query
Last updated