Untitled

mail@pastecode.io avatar
unknown
javascript
a month ago
641 B
2
Indexable
Never
db.Customers.find({name:{$in:["มานะ"]}},{name:1})

db.Customers.find({gender:{$in:["female"]}},{name:1})

db.Customers.find({height:{$gt:170}})

db.Orders.findOne({_id: ObjectId('65a8d28105377522e83367d1')})

db.Orders.find().sort({ amount: -1 }).limit(3)

db.Orders.find({ $or: [{_id: ObjectId('65a8d28105377522e83367cd')}, { phone: "0813946164" }] })

db.Orders.find({date: {$gte: "2024-01-02",$lte: "2024-01-04"}})

db.Customers.find({name:{$regex:"มา"}})

db.Customers.find({ $or: [{ name: { $regex: "นะ" } }, { phone: { $regex: "5525" } }] })

db.Orders.find({items:{$elemMatch:{name:"Mineral water"}}}
Leave a Comment