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"
}
})

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay