DEV Community

avinash-repo
avinash-repo

Posted on

Mongo Quries

https://mongoplayground.net/
https://mongoplayground.net/p/nSkGB4QZ25u
https://mongoplayground.net/p/qGtVCJXWdu6
https://mongoplayground.net/p/FaFRhAOuNd-
https://mongoplayground.net/p/wpsz2rRBAvl
https://mongoplayground.net/p/PKe4tMz9GFD

https://www.mongodb.com/docs/database-tools/mongodump/

https://www.mongodb.com/docs/manual/replication/
https://www.mongodb.com/docs/manual/sharding/

https://onecompiler.com/mongodb/422z3pbxc for Mongo
https://onecompiler.com/mysql/422z45cjx for MYSQL

Topic tutorials on Node
https://onecompiler.com/tutorials/nodejs/express/express
https://onecompiler.com/tutorials/mysql
https://onecompiler.com/tutorials/javascript

https://onecompiler.com/javascript
https://onecompiler.com/typescript
https://onecompiler.com/tools

https://www.humongous.io/app/playground/mongodb/65b950fc6b903efa6a7a0d74
https://www.humongous.io/docs/projects/create-project
https://www.humongous.io/docs/collections/search

https://www.mycompiler.io/new/mongodb

BSON=
[
{
"key": 1,
"price": 666
},
{
"key": 2,
"price": 300
}
]

db.collection.aggregate([
{
$group: {
_id: null,
total: {
$sum: "$key"
},
totalprice: {
$sum: "$price"
},
max: {
$max: "$price"
},
min: {
$min: "$price"
},
avg: {
$avg: "$price"
},
count: {
$sum: 1
}
}
}
])

db.collection.aggregate([
{
$sort: {
price: 1
}
}
])

db.collection.find({
"$text": {
"$search": "cakes"
}
})

Top comments (0)