Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MongoDB Exam C100DBA Topic 5 Question 106 Discussion

Actual exam question for MongoDB's C100DBA exam
Question #: 106
Topic #: 5
[All C100DBA Questions]

Which of the following commands will return all the posts with number of likes greater than 100 and less than 200, both inclusive?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Garry
2 months ago
If I was a post with 100 likes, I'd be offended to be excluded from this query. Gotta love those inclusive ranges!
upvoted 0 times
...
Geoffrey
2 months ago
Option B seems to be the most straightforward approach. Why complicate it with inclusive ranges?
upvoted 0 times
Linn
12 days ago
User 3: Agreed, no need to complicate things with inclusive ranges.
upvoted 0 times
...
Janet
15 days ago
User 2: Yeah, it's simpler that way.
upvoted 0 times
...
Mike
28 days ago
User 1: I think option B is the correct one.
upvoted 0 times
...
...
Trevor
2 months ago
Ha! Option D is a classic trick question. The greater than and less than symbols should be outside the curly braces.
upvoted 0 times
...
Wei
2 months ago
I think Option C is the way to go. It's more explicit about the inclusive range with $gte and $lt.
upvoted 0 times
Marvel
13 days ago
User3: Yeah, Option C is the best choice for that query.
upvoted 0 times
...
Mammie
14 days ago
User2: I agree, $gte and $lt make it clear.
upvoted 0 times
...
Marshall
15 days ago
User1: I think Option C is the correct one.
upvoted 0 times
...
...
Ilene
3 months ago
Option A looks like the correct one to me. It uses the $gte and $lte operators to get posts with likes between 100 and 200, inclusive.
upvoted 0 times
Freida
1 months ago
Yes, option A is the right choice. It specifies the range correctly with $gte and $lte operators.
upvoted 0 times
...
Marylin
2 months ago
I think option A is correct too. It covers the range of likes we are looking for.
upvoted 0 times
...
...
Evangelina
3 months ago
I'm not sure, but I think option C might also work because it uses $lt for less than 200.
upvoted 0 times
...
Kayleigh
3 months ago
I agree with Christene, option A makes sense because it includes both 100 and 200 in the range.
upvoted 0 times
...
Christene
3 months ago
I think the correct command is A) db.posts.find({ likes : { $gte : 100 , $lte : 200 } } );
upvoted 0 times
...

Save Cancel