0 votes
in MongoDB by
Which commands will return all the posts with number of likes greater than 100 and less than 200, both inclusive?

A - db.posts.find({ likes : { $gt : 100, $lt : 200 } } );

B - db.posts.find({ likes : { $gte : 100, $lt : 200 } } );

C - db.posts.find({ likes : { $gt : 100 , $lte : 200 } } );

D - db.posts.find({ likes : { $gte : 100 , $lte : 200 } } );

1 Answer

0 votes
by

Correct ans is

D - db.posts.find({ likes : { $gte : 100 , $lte : 200 } } );

Related questions

0 votes
asked Jun 17, 2020 in MongoDB by AdilsonLima
0 votes
asked Oct 26, 2020 in MongoDB by AdilsonLima
...