我正在使用mongoDB数据库,其中我有以下格式的集合。
我希望您能提供像这样的查询。
{ name : name1 , area: a , country : c}
{ name : name2 , area: b , country : c}
{ name : name3 , area: a1 , country : c1}
{ name : name4 , area: b1 , country : c1}
我希望您能提供像这样的查询。
select * from coll where (country =c and area =a) or (country = c1 and area = b1)
在mongodb查询中。
我已经阅读了许多文档,但没有找到合适的答案。
因此,如果有人知道,请回复。
谢谢。