MongoDB C100DBA Question Answer
What does the following aggregate query perform?
Fetches the posts with likes between 100 and 200 and sets their _id as null
Groups the posts by number of likes (101, 102, 103.) by adding 1 every time
Calculates the number of posts with likes between 100 and 200
Fetches the posts with likes between 100 and 200, sets the _id of the first document as null and then increments it 1 every time
TESTED 20 Oct 2025
Copyright © 2014-2025 ACE4Sure. All Rights Reserved