The Ultimate MongoDB Aggregation Guide: Make Your Queries Soar in One Video

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ม.ค. 2025

ความคิดเห็น • 167

  • @EngineeringDigest
    @EngineeringDigest  ปีที่แล้ว +17

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

  • @manojmohapatra986
    @manojmohapatra986 ปีที่แล้ว +36

    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🎉

  • @poojagarva
    @poojagarva ปีที่แล้ว +23

    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.

  • @maullikakbari8200
    @maullikakbari8200 ปีที่แล้ว +6

    one of the best aggregation tutorial available on youtube till now thank you sir.

  • @DilipBoidya-bb3be
    @DilipBoidya-bb3be 6 หลายเดือนก่อน +6

    I like your accent, your explanations and so i subscribed you. Keep posting more vids.

  • @anshulsharma9424
    @anshulsharma9424 7 หลายเดือนก่อน +1

    Sir all of you content is a gold mine for developers.

  • @InzamamMalik
    @InzamamMalik ปีที่แล้ว +2

    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.

  • @parmaryash4406
    @parmaryash4406 ปีที่แล้ว +1

    Finally found great video for mongodb aggregation queries, really thank you so much

  • @memekannada2901
    @memekannada2901 ปีที่แล้ว +4

    benifitted so much from this playlist..appreciate you sir!!

  • @cruzcreez65
    @cruzcreez65 7 หลายเดือนก่อน +2

    Unique way of teaching.. no boringness ❤❤🎉🎉

  • @ShekharTayde-j3k
    @ShekharTayde-j3k ปีที่แล้ว +2

    Bachpan me hum padhte the ..... 😆..Amazing videos bhai..helped alot.

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว +1

      Thanks 😀
      *Instagram:* instagram.com/thevipulvats
      *Discord:* discord.gg/7e6WdBJ9dT

  • @nobitaa32
    @nobitaa32 ปีที่แล้ว

    Op sir first time aaya hu kya hi technique he aapki padhaneki

  • @DevilDoer9224
    @DevilDoer9224 5 หลายเดือนก่อน +3

    Great video no doubt but at 31:50 I am getting output as [ { _id: null, avgS: null } ] and my query is db.students.aggregate([{$group:{_id:null, avgS:{ $avg:{ $filter:{ input:"$scores",as:"score",cond:{ $gt: ["$score",12]}}}}}}]). What could be wrong? And this is what Chatgpt says "The problem with your query is that the $filter operator is being used in a way that doesn't make sense for calculating the average of the scores for students older than 12. Specifically:
    Incorrect Use of $filter: The $filter operator is intended to filter elements within an array, but you are using it to compare age, which is not an array element.
    Invalid Condition: The condition {$gt:["$age",12]} inside $filter is intended to filter array elements based on a property of the array elements themselves, but age is a top-level document field, not a property within the scores array."

  • @JonayedAhamad-m5n
    @JonayedAhamad-m5n ปีที่แล้ว +1

    Subscribed, Your teaching style is something unique😊😊

  • @kishankumar-ze5pf
    @kishankumar-ze5pf 8 หลายเดือนก่อน +1

    most underrated channel

  • @SawanKumar-tr9xz
    @SawanKumar-tr9xz ปีที่แล้ว +2

    Best mongodb playlist ❤

  • @KhushaliChauhan-o1b
    @KhushaliChauhan-o1b ปีที่แล้ว

    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 ..

  • @fatimaiqra2169
    @fatimaiqra2169 4 หลายเดือนก่อน

    thanks a lot for such a deeper explanation!

  • @noedition1968
    @noedition1968 ปีที่แล้ว

    Such a beautiful information for mongodb pipeline. Thanks a lot for this valuable video ❤

  • @tanmaychavan743
    @tanmaychavan743 ปีที่แล้ว +1

    Just please never stop making such amazing videos ❤❤

  • @RohitPatil-cr2dr
    @RohitPatil-cr2dr 18 วันที่ผ่านมา

    Bhai ek number padhaya hai next level ❤❤❤

  • @ashwinchaudhary5730
    @ashwinchaudhary5730 7 หลายเดือนก่อน

    Awesome explaination with multiple examples, thanks

  • @Rajugupta-gp2eg
    @Rajugupta-gp2eg ปีที่แล้ว +2

    Awaiting next video !!

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      Thanks bro, Please support us by sharing the channel with your colleagues 🤝

  • @KaustubhKolhe
    @KaustubhKolhe 2 หลายเดือนก่อน

    very well explained, thank you sir

  • @AnilKumar-fw8bw
    @AnilKumar-fw8bw ปีที่แล้ว

    Thank you for explaining in a simple way.

  • @stiphenrobert4469
    @stiphenrobert4469 ปีที่แล้ว

    Best mongodb tutorial on earth

  • @sohammehta6614
    @sohammehta6614 ปีที่แล้ว

    Thank your very much for the great explanation!!

  • @nemotivity
    @nemotivity ปีที่แล้ว +4

    Loved the video. Waiting for the next one. Keep making such awesome tutorials. ♥

  • @vaibhavnikalje2655
    @vaibhavnikalje2655 หลายเดือนก่อน

    Great teaching 🤩

  • @zeeshankalyar7693
    @zeeshankalyar7693 ปีที่แล้ว

    Thanks bhai jaan bahut hi achi video bnae hai apne

  • @sadotore
    @sadotore ปีที่แล้ว

    vai, a big "THANK YOUUU" for u

  • @taukirkhan3417
    @taukirkhan3417 ปีที่แล้ว

    Mza agya bro, enjoy and completely understand. Thanks

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      Thank you brother, it will be a huge help if you can share this course on LinkedIn.

  • @VivekYadav-up7uu
    @VivekYadav-up7uu ปีที่แล้ว

    easy and effective way to explain.

  • @aditideshmukh4752
    @aditideshmukh4752 2 หลายเดือนก่อน

    helped a lot! thanks

  • @vishalgarna12
    @vishalgarna12 2 หลายเดือนก่อน

    Sirja bhi aa gaya hu❤❤

  • @anandatole6529
    @anandatole6529 ปีที่แล้ว

    explain in simple way. no complex. Thanks

  • @mahirjain5833
    @mahirjain5833 ปีที่แล้ว

    Love your tutorials.Pls cover entire mongo db.

  • @IftekharAhmed-f3r
    @IftekharAhmed-f3r ปีที่แล้ว

    Fantastic, I learned a lot today

  • @pritimodanwal06
    @pritimodanwal06 ปีที่แล้ว

    very nice explain bro, before it i have little bit confusion regarding pipeline now clear thank you bro

  • @abhijeetkumarsingh2504
    @abhijeetkumarsingh2504 ปีที่แล้ว

    You Got A Subscriber,
    loved the way you explain 😂 🔥

  • @naimhasan5346
    @naimhasan5346 ปีที่แล้ว

    Bhai you are the best! Your teaching style is so unique and interesting. I love it ❤

  • @ummeed4365
    @ummeed4365 ปีที่แล้ว

    Excellent content bhai highly appreciate your efforts.

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      Thanks! 😊 You can join our discord or Insta @thevipulvats.

  • @farukkhan6324
    @farukkhan6324 ปีที่แล้ว

    hey man awesome video loved they way you explain waiting for more videos. keep it up

  • @mohdshahnawaz5047
    @mohdshahnawaz5047 3 หลายเดือนก่อน

    very good sir.

  • @dhriteshkumar1786
    @dhriteshkumar1786 ปีที่แล้ว +1

    awesome explanation sir ❤

  • @MohammedHasmi577
    @MohammedHasmi577 5 หลายเดือนก่อน

    Bhai tum reels me dikhte ho vohi hona? Love your videos ❤🎉

  • @vivekkumaryadav9862
    @vivekkumaryadav9862 ปีที่แล้ว

    thanks bhaiya ji...ek video or aggregation completed ...:))

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      Please consider sharing feedback on LinkedIn. 🙏🏻

  • @MohammedHasmi577
    @MohammedHasmi577 หลายเดือนก่อน

    Sir i knoe mongodb but still i have learnt a lot of things from this playlist

  • @explorewithsatish1208
    @explorewithsatish1208 ปีที่แล้ว

    You doing awesome job do it continue 👌🎉❤️

  • @aafibaloch654
    @aafibaloch654 ปีที่แล้ว

    Deserve more views and subscribers ❤

  • @rajverma5051
    @rajverma5051 ปีที่แล้ว

    Thank you sir ❤

  • @see_the_nature-stn
    @see_the_nature-stn ปีที่แล้ว

    Sir you are great

  • @shashanksingh4708
    @shashanksingh4708 7 หลายเดือนก่อน

    can you do a video on these complex queries implemented using spring data mongoDB ?

  • @cyrusthapa794
    @cyrusthapa794 ปีที่แล้ว

    bhaut hard XD : ) ❤‍🔥

  • @foodistan9311
    @foodistan9311 ปีที่แล้ว +2

    Please do a video on $lookup as well.
    BTW a great explanation.

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว +1

      Will do soon, Please support us by joining on Instagram or Discord 🙂

    • @foodistan9311
      @foodistan9311 ปีที่แล้ว +1

      @@EngineeringDigest Please. waiting for so long

  • @abuzubaer3083
    @abuzubaer3083 ปีที่แล้ว

    nice explanation

  • @shamimsarker839
    @shamimsarker839 ปีที่แล้ว

    Best 🔥🔥🔥🔥🔥🔥🔥

  • @shivamkatiyar2899
    @shivamkatiyar2899 ปีที่แล้ว

    Cool way of teaching.

  • @prathameshhiremath1379
    @prathameshhiremath1379 ปีที่แล้ว

    Bhai really apka voice bahut katarnak hai

  • @watchprakhar
    @watchprakhar ปีที่แล้ว

    achcha samjhaya bhai apne

    • @watchprakhar
      @watchprakhar ปีที่แล้ว

      subscribed

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      Thanks! 😊 Join my Insta fam if u haven’t already: @thevipulvats

  • @rajd2990
    @rajd2990 ปีที่แล้ว

    Amazing 👍👍

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      Thanks! 😊 Join my Insta fam if u haven’t already: @thevipulvats

  • @03devrajtak7
    @03devrajtak7 ปีที่แล้ว

    how to use indexing for aggregation pipeline?

  • @shubhamgupta-bl1tr
    @shubhamgupta-bl1tr ปีที่แล้ว +1

    nice video, transaction r bhi bha dijiye

  • @ShubhiK-ro8cl
    @ShubhiK-ro8cl 8 หลายเดือนก่อน

    Last query with filter is not working. Please add correct query here.

  • @harsh__dev
    @harsh__dev ปีที่แล้ว +2

    Sir please provide the pdf/cheat sheet as well. By the way love your lectures

  • @abhishekbisht3264
    @abhishekbisht3264 11 หลายเดือนก่อน

    Bhaiya meine mongo db abhi start kara hai kuch tips dedo jisse mein issey achhe se seekh jaaun

  • @AdarshSingh-mo1kc
    @AdarshSingh-mo1kc ปีที่แล้ว

    his voice🔥🔥🔥🔥

  • @jyotshnamanjari2372
    @jyotshnamanjari2372 ปีที่แล้ว

    You are wonderful.
    Can you please explain $reduce?
    Also can you please include datetime in your examples.

  • @arnavkaul7827
    @arnavkaul7827 ปีที่แล้ว

    Damn good lecture

  • @SachinGupta-iy3sz
    @SachinGupta-iy3sz ปีที่แล้ว

    Hey,
    Is there any platform available where we can practice mongodb queries.

  • @vaishalimandora8956
    @vaishalimandora8956 ปีที่แล้ว

    Sir is your playlist is sufficient to learn mongodb ...as a node js developer

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว +1

      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.

  • @OCEMTechZone
    @OCEMTechZone 6 หลายเดือนก่อน

    Great🎉

  • @Mehuldeveloper
    @Mehuldeveloper 11 หลายเดือนก่อน

    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.

    • @EngineeringDigest
      @EngineeringDigest  11 หลายเดือนก่อน

      Watch indexing video in this playlist

    • @Mehuldeveloper
      @Mehuldeveloper 11 หลายเดือนก่อน

      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

  • @lifeusa2168
    @lifeusa2168 9 หลายเดือนก่อน

    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?

  • @hitbymillion
    @hitbymillion ปีที่แล้ว

    thanks man : )

  • @JaiSreeRam466
    @JaiSreeRam466 ปีที่แล้ว

    Super anna ❤

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      Thanks! 😊 Join my Insta fam if u haven’t already: @thevipulvats

  • @mikeplai4189
    @mikeplai4189 ปีที่แล้ว

    great explaination
    but need more videos on aggregation with join collections

  • @mithilesh8349
    @mithilesh8349 ปีที่แล้ว +1

    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

    • @mithilesh8349
      @mithilesh8349 ปีที่แล้ว

      Help me to write the aggregation for better understanding

    • @mikeplai4189
      @mikeplai4189 ปีที่แล้ว +2

      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,
      },
      },
      ]);

  • @manojmohapatra986
    @manojmohapatra986 ปีที่แล้ว

    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

  • @SparkYourMindConnections
    @SparkYourMindConnections ปีที่แล้ว

    Best Video on internet❤‍🔥 Maza agya

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      Thanks 🙏
      Consider joining our discord or Instagram.

  • @raiyanabdurrehman1411
    @raiyanabdurrehman1411 ปีที่แล้ว

    Awesome Video..BTW any idea why the last problem's solution showing avgScores as null??

    • @aditideshmukh4752
      @aditideshmukh4752 2 หลายเดือนก่อน

      yes i am also getting null....dont know why

  • @vampirekabir
    @vampirekabir ปีที่แล้ว

    cant get it why 44 psychos disliked this such legendary video,absolutely fabulous, amazing

  • @UsamaArif-c4l
    @UsamaArif-c4l ปีที่แล้ว

    if two student have same age and same hobbies then what will be output?

  • @rahulmk8698
    @rahulmk8698 6 หลายเดือนก่อน +1

    Hello Sir,
    Can you share your docs with us?

  • @varunjaiswar5062
    @varunjaiswar5062 ปีที่แล้ว

    sir data dal te dal te , fatt gai mere , please provide data in description.

  • @khawajamuhammadmushood5455
    @khawajamuhammadmushood5455 ปีที่แล้ว

    can someone explain me the use of dollar sign in aggregate quries

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      it means you are going to use reserved keyword ( operator )

  • @vinitph
    @vinitph 6 หลายเดือนก่อน

    sir can you share your notes with us i would be very grateful

  • @kunal_Jangra
    @kunal_Jangra ปีที่แล้ว

    Plz provide this data you are using we can practice by using it

  • @preetilangayan6326
    @preetilangayan6326 ปีที่แล้ว

    Please make video on replication also.

  • @shashankjain4024
    @shashankjain4024 3 หลายเดือนก่อน

    Informational video. Thanks.
    However should work on your tone and extra modulation. It breaks the learning rhythm for the audience.

  • @random2059
    @random2059 ปีที่แล้ว

    👋👋🙏🙏
    _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

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว

      05:19

    • @random2059
      @random2059 ปีที่แล้ว

      @@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

  • @harshmehta1141
    @harshmehta1141 ปีที่แล้ว

    Bro Engineering Digest very unique and attractive name

  • @mithleshkumar-ds9ex
    @mithleshkumar-ds9ex ปีที่แล้ว

    Sir Please database link

  • @mikeplai4189
    @mikeplai4189 ปีที่แล้ว

    kamal

  • @vampirekabir
    @vampirekabir ปีที่แล้ว

    bro video on $facet and $bucket pls

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว +1

      just recorded, will upload next week

    • @vampirekabir
      @vampirekabir ปีที่แล้ว

      @@EngineeringDigest thanks, i always look for ur explanation teach in such clear and fun way

  • @ihtshamhaider6849
    @ihtshamhaider6849 ปีที่แล้ว

    wow method

  • @farhanakhtar5229
    @farhanakhtar5229 5 หลายเดือนก่อน +1

    bhai ne news anchor ki job chod kar coder bana he

  • @swapnilw.
    @swapnilw. ปีที่แล้ว

    i think u r from delhi😎

  • @code-with-me-2002
    @code-with-me-2002 ปีที่แล้ว

    bro college teacher ki taraha , line by line padhke hindi translate mat karo

  • @sksayrilamed4087
    @sksayrilamed4087 ปีที่แล้ว

    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 .-__-

    • @EngineeringDigest
      @EngineeringDigest  ปีที่แล้ว +1

      bhai khadoos hi hu mai..real life me bhi😅