The Ultimate MongoDB Aggregation Guide: Make Your Queries Soar in One Video
HTML-код
- Опубликовано: 4 фев 2023
- 🟡 Get 1 to 1 coaching with me: topmate.io/engineeringdigest
🟡 Donate: paypal.me/engineeringdigest
🟡 Perks: www.youtube.com/@EngineeringD...
🔴 Discord: / discord
🔴 Twitch: / engineeringdigest
🔴 Personal RUclips Channel: / @thevipulvats
🔴 Instagram: / thevipulvats
🔴 Twitter: / thevipulvats
🔴 LinkedIn: / thevipulvats
🔴 Website: engineeringdigest.net
🔴 Video summary
This video is a comprehensive guide to MongoDB aggregation, where you'll learn how to use various aggregation operators to process data stored in MongoDB collections. You'll see how to use these operators to perform various data processing tasks such as filtering, transforming, grouping and summarizing data. The video aims to help you make the most out of your MongoDB queries, allowing you to extract insights and aggregate data more effectively. By the end of the video, you'll be equipped with the skills to confidently perform complex data processing tasks in MongoDB.
🔴 Timestamps
Intro 0:00
Use this as sample data, it is not the same. But will do the work
db.teachers.insertMany([
{ "_id": 1, "name": "John Doe", "age": 35, "gender": "male" },
{ "_id": 2, "name": "Jane Smith", "age": 40, "gender": "female" },
{ "_id": 3, "name": "Michael Johnson", "age": 45, "gender": "male" },
{ "_id": 4, "name": "Emily Williams", "age": 30, "gender": "female" },
{ "_id": 5, "name": "Robert Brown", "age": 38, "gender": "male" },
{ "_id": 6, "name": "Emma Jones", "age": 33, "gender": "female" },
{ "_id": 7, "name": "William Davis", "age": 37, "gender": "male" },
{ "_id": 8, "name": "Olivia Miller", "age": 41, "gender": "female" },
{ "_id": 9, "name": "David Wilson", "age": 36, "gender": "male" },
{ "_id": 10, "name": "Sophia Moore", "age": 32, "gender": "female" },
{ "_id": 11, "name": "Richard Taylor", "age": 39, "gender": "male" },
{ "_id": 12, "name": "Isabella Anderson", "age": 43, "gender": "female" },
{ "_id": 13, "name": "Joseph Thomas", "age": 34, "gender": "male" },
{ "_id": 14, "name": "Mia Jackson", "age": 42, "gender": "female" },
{ "_id": 15, "name": "Charles White", "age": 36, "gender": "male" },
{ "_id": 16, "name": "Abigail Harris", "age": 31, "gender": "female" },
{ "_id": 17, "name": "Daniel Martin", "age": 44, "gender": "male" },
{ "_id": 18, "name": "Evelyn Thompson", "age": 38, "gender": "female" },
{ "_id": 19, "name": "Matthew Garcia", "age": 37, "gender": "male" },
{ "_id": 20, "name": "Sofia Martinez", "age": 35, "gender": "female" },
{ "_id": 21, "name": "Andrew Robinson", "age": 40, "gender": "male" },
{ "_id": 22, "name": "Grace Clark", "age": 33, "gender": "female" },
{ "_id": 23, "name": "Joshua Rodriguez", "age": 39, "gender": "male" },
{ "_id": 24, "name": "Avery Lewis", "age": 42, "gender": "female" },
{ "_id": 25, "name": "Christopher Lee", "age": 37, "gender": "male" },
{ "_id": 26, "name": "Chloe Walker", "age": 31, "gender": "female" },
{ "_id": 27, "name": "Kevin Hall", "age": 44, "gender": "male" },
{ "_id": 28, "name": "Zoey Allen", "age": 38, "gender": "female" },
{ "_id": 29, "name": "Brian Young", "age": 36, "gender": "male" },
{ "_id": 30, "name": "Harper King", "age": 34, "gender": "female" }
])
thank you for this document.
Thank you for it.
Thank youu...
Working as a developer from last 4 yrs but i didnt know some operators even exists.. thank you for your support . Watching your videos is like bliss af🎉
Welcome aboard! 😀
Your MongoDB playlist is absolutely fantastic! Your tutorials and explanations make it so easy to understand and follow. I've been searching for a reliable resource to learn MongoDB, and your playlist makes it easier for me to apply what I've learned to my own projects.
Thanks, this comment made my day :)
one of the best aggregation tutorial available on youtube till now thank you sir.
Finally found great video for mongodb aggregation queries, really thank you so much
Love you bro, being technical matters but you have got god gifted teaching skill along with technical competency. always spare some of your time for teaching. found your video very helpful and will recommend to others for sure. no click bate no gimmicks pure knowledge with nicely organised flow.
Thanks a ton bro
Such a beautiful information for mongodb pipeline. Thanks a lot for this valuable video ❤
wow...its very first time ,I am watching your videos but really....its awesome your way to convey the concept is literally different from other ..
Thanks😀
I like your accent, your explanations and so i subscribed you. Keep posting more vids.
Thank you for explaining in a simple way.
benifitted so much from this playlist..appreciate you sir!!
Most welcome!
Just please never stop making such amazing videos ❤❤
Thank your very much for the great explanation!!
Sir all of you content is a gold mine for developers.
hey man awesome video loved they way you explain waiting for more videos. keep it up
Thanks a ton!
Loved the video. Waiting for the next one. Keep making such awesome tutorials. ♥
Thanks a lot 😊
Subscribed, Your teaching style is something unique😊😊
Fantastic, I learned a lot today
Awesome explaination with multiple examples, thanks
vai, a big "THANK YOUUU" for u
Bhai you are the best! Your teaching style is so unique and interesting. I love it ❤
Thank you so much 😀
You Got A Subscriber,
loved the way you explain 😂 🔥
Welcome aboard!😀
Love your tutorials.Pls cover entire mongo db.
Thanks bhai jaan bahut hi achi video bnae hai apne
Op sir first time aaya hu kya hi technique he aapki padhaneki
Excellent content bhai highly appreciate your efforts.
Thanks! 😊 You can join our discord or Insta @thevipulvats.
very nice explain bro, before it i have little bit confusion regarding pipeline now clear thank you bro
You are welcome
Mza agya bro, enjoy and completely understand. Thanks
Thank you brother, it will be a huge help if you can share this course on LinkedIn.
Unique way of teaching.. no boringness ❤❤🎉🎉
easy and effective way to explain.
Best mongodb playlist ❤
Thanks! 😊 Join my Insta fam: @thevipulvats
Awaiting next video !!
Thanks bro, Please support us by sharing the channel with your colleagues 🤝
Best mongodb tutorial on earth
most underrated channel
You doing awesome job do it continue 👌🎉❤️
Thank you so much 😁
Awesome Video..BTW any idea why the last problem's solution showing avgScores as null??
bhaut hard XD : ) ❤🔥
thanks man : )
awesome explanation sir ❤
Thanks for liking
Bachpan me hum padhte the ..... 😆..Amazing videos bhai..helped alot.
Thanks 😀
*Instagram:* instagram.com/thevipulvats
*Discord:* discord.gg/7e6WdBJ9dT
Deserve more views and subscribers ❤
Thanks! 😊 Join my Insta fam: @thevipulvats
nice explanation
You are wonderful.
Can you please explain $reduce?
Also can you please include datetime in your examples.
Your videos are really awesome. I have one question
How can we use two ids while grouping? Is it possible if yes then how. Can you please explain?
Thank you sir ❤
thanks bhaiya ji...ek video or aggregation completed ...:))
Please consider sharing feedback on LinkedIn. 🙏🏻
can you do a video on these complex queries implemented using spring data mongoDB ?
Cool way of teaching.
Sir you are great
explain in simple way. no complex. Thanks
Glad you liked it!
Sir please provide the pdf/cheat sheet as well. By the way love your lectures
Damn good lecture
Best 🔥🔥🔥🔥🔥🔥🔥
Please do a video on $lookup as well.
BTW a great explanation.
Will do soon, Please support us by joining on Instagram or Discord 🙂
@@EngineeringDigest Please. waiting for so long
Great🎉
Amazing 👍👍
Thanks! 😊 Join my Insta fam if u haven’t already: @thevipulvats
Dont know on the area you expertise on. But if you create some playlist on devops (as not much good resourse available) , gcp , aws etc. trust me uh ll be unbeatable. Mark my words
how to use indexing for aggregation pipeline?
Bhai really apka voice bahut katarnak hai
Thanks :)
great explaination
but need more videos on aggregation with join collections
Will upload soon
@@EngineeringDigest Thanks
Super anna ❤
Thanks! 😊 Join my Insta fam if u haven’t already: @thevipulvats
nice video, transaction r bhi bha dijiye
Sure
achcha samjhaya bhai apne
subscribed
Thanks! 😊 Join my Insta fam if u haven’t already: @thevipulvats
Sir is your playlist is sufficient to learn mongodb ...as a node js developer
It will help you to query the database directly and basic understanding of mongodb. Then you have to learn mongoose which makes node js to connect and query the database.
Hey,
Is there any platform available where we can practice mongodb queries.
Check last video of the playlist
Bhaiya meine mongo db abhi start kara hai kuch tips dedo jisse mein issey achhe se seekh jaaun
his voice🔥🔥🔥🔥
Problem statement :
In a Json file or Mongo there is an Object contains Company name and Gender,
You Have to find the count of female and male in a seperate column for each company.
ex:
Company Male female
A 22 10
B 20 18
C 10 30
Help me to write the aggregation for better understanding
const employees = await Employee.aggregate([
{
$group: {
_id: { companyName: "$companyName", gender: "$gender" },
count: { $sum: 1 },
},
},
{
$project: {
_id: 0,
companyName: "$_id.companyName",
gender: "$_id.gender",
count: 1,
},
},
]);
cant get it why 44 psychos disliked this such legendary video,absolutely fabulous, amazing
kamal
Bro, can you help me? I'm working with a MongoDB database with 5 million records. When I fetch the total count based on sum or query, the query execution is becoming very slow.
Watch indexing video in this playlist
i've watched your video on indexing and have applied the techniques but due to large data collection giving same result is there any other techniques ? @@EngineeringDigest
Please make video on replication also.
if two student have same age and same hobbies then what will be output?
friendship
can someone explain me the use of dollar sign in aggregate quries
it means you are going to use reserved keyword ( operator )
sir can you share your notes with us i would be very grateful
Last query with filter is not working. Please add correct query here.
ok sir
No srsly.... it's returning null😶
wow method
Many many thanks
Hello Sir,
Can you share your docs with us?
sir data dal te dal te , fatt gai mere , please provide data in description.
👋👋🙏🙏
_id kaise age ho sakta hai id to id hai , ( _id:"$age") age acting like _id keya ho rah hai inha pe thora samjhaye , please clear this confusion ???👋👋🙏🙏 thora dhundne par pata chala isko accumulator object bolte hai ....
thora ispe v batye .. please reply
05:19
@@EngineeringDigest samjha to ye _id uo wala _id nahi nahi hai ye ac new _id banrahe ho age ke basis pea ? 🙏🙏🙏🙏 bata please do maine full video dekha hai note v bana raha hu .... mujhe 5:19 thora samaj nahi aya sir
Best Video on internet❤🔥 Maza agya
Thanks 🙏
Consider joining our discord or Instagram.
Plz provide this data you are using we can practice by using it
done, check pinned comment
Sir Please database link
Bro Engineering Digest very unique and attractive name
Thanks 🙏
bro video on $facet and $bucket pls
just recorded, will upload next week
@@EngineeringDigest thanks, i always look for ur explanation teach in such clear and fun way
i think u r from delhi😎
Yess 🤓
speak english
aap ka smjhana acha hay but behavior thora accha kariya bate thora dhang say koriya bohot karush lagata hay ..lakin apnay best aggregation concept samjaya hay .-__-
bhai khadoos hi hu mai..real life me bhi😅
bro college teacher ki taraha , line by line padhke hindi translate mat karo
karunga
@Music-ub2gc car racing krle tu.. galat jagah aa gya bodam
kuch samaj ni aaya bekaar vedio.
video*
@@EngineeringDigestsir can u please provide notes ?
For last filter
[
{
"name": "Vinay",
"age": 34,
"scores": [22, 33, 4, 44, 55]
},
{
"name": "Alice",
"age": 28,
"scores": [10, 20, 30, 40, 50]
},
{
"name": "Bob",
"age": 42,
"scores": [15, 25, 35, 45, 55]
},
{
"name": "Emma",
"age": 31,
"scores": [18, 28, 38, 48, 58]
},
{
"name": "Chris",
"age": 37,
"scores": [12, 22, 32, 42, 52]
},
{
"name": "Sophia",
"age": 29,
"scores": [25, 35, 45, 55, 65]
},
{
"name": "David",
"age": 36,
"scores": [30, 40, 50, 60, 70]
},
{
"name": "Linda",
"age": 45,
"scores": [8, 18, 28, 38, 48]
},
{
"name": "Michael",
"age": 27,
"scores": [16, 26, 36, 46, 56]
},
{
"name": "Emily",
"age": 33,
"scores": [5, 15, 25, 35, 45]
}
]
db.scoreDta.aggregate([{$group:{_id:null,avgScore:{$avg:{$filter:{input:"$scores" , as:"score",cond:{$gt:["$age",30]}}}}}}]);
Is it working for u?
@@ShubhiK-ro8clLast time it was working.
@@manikanth.8507 Last time it was working