Select from following answers:- db.StudentGrade.find({ score : { $gt : 70 , $lt : 80 } } );
- db.StudentGrade.find({ score : { $gte : 70 , $lte : 80 } } );
- db.StudentGrade.find({ score : { $gt : 70 , $lte : 80 } } );
- db.StudentGrade.find({ score : { $gte : 70 , $lt : 80 } } );
- All Above
$gte means greater than equal to while $lte indicates less than equals to. We are suppose to find the scores with values 70 to 80 inclusive. Henceforth, option 2 is correct i.e.
db.StudentGrade.find({ score : { $gte : 70 , $lte : 80 } } );
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator