Consider the query: db.sample.find({ "b": { "$gte": 4, "$lte": 6 } }) Assuming all documents exist in the sample collection, which of the following documents would be returned by this query? Check all that apply:
题目选项
- A.{ "_id": 24 , "a": 3 , "b": 3 }
- B.{ "_id": 1 , "a": 1 , "b": 10 }
- C.{ "_id": 25 , "a": 3 , "b": 7 }
- D.{ "_id": 13 , "a": 2 , "b": 6 }
- E.{ "_id": 26 , "a": 3 , "b": 5 }
答案置信度:高
正确答案:D、E
解析语言:中文
$gte:4 且 $lte:6 表示 b 落在 [4,6] 区间:_id 13 的 b=6、_id 26 的 b=5 会被返回。b=3 小于下界,b=7 和 b=10 大于上界,均不匹配。