mongon数据库的查询样例

db.getCollection('car').find(
{'store':'01296254',status:{$in:['5',5]},#in 表示查询范围
source: {$in: [
'souche_entering',
'assess',
'app_entering',
'che168',
'kcb',
'chelaike',
'stock',
'cheniu',
'shanghu',
'auction',
'auction-dsc',
'alipay',
'xianyu',
'purchase_payment'
]},
$or:[{'order_status':10},{'order_status':0},{'order_status':{$exists:false} #或语句
}],
'date_delete':{$exists:false}}).count() # 某个字段不存在,count计数

 

posted @ 2018-08-08 19:26  crazy_h  阅读(615)  评论(0编辑  收藏  举报