mongo网页版查询常用语句

时间:2022-02-08 20:02:04
{
  "mkt.code":{"$in": ["1001","1002","1003","1005","1055","1012"]}
}

4.包含或不包含  $in或$nin 

模糊查询如下:
{
    "name.szh":/中国/
}
{
    "idxcd": {"$exists":true}
 
    "secu" : { "$regex" : ".*SH_EQ$"}
 
    "$or" : [ { "secu" : { "$regex" : ".*SH_EQ$"}} , { "secu" : { "$regex" : ".*SZ_EQ$"}}]
 }
 
 不等于
{
    "industry.profit":{"$ne":0},"product":{"$ne":null} 
}

{
    "upt":{ "$gte": ISODate("2016-11-02T10:24:39.720Z")}
}
{
   "dt" : { "$lte" : "2016-06-12"} 小于等于   "et":{"$gte":"20160329"}  大于等于
} 
{ 
  "$or" : [ { "secu" : { "$regex" : ".*SH_EQ$"}} , { "secu" : { "$regex" : ".*SZ_EQ$"}} ,
  { "secu" : { "$regex" : ".*QS_EQ$"}}] , "fp" : "2013" , "q" : "Q4"
}
  
{ 
    "$or":[{"f1":"1"},{"f2":"1"},{"f3":"1"},{"f4":"1"},{"f5":"1"}, {"f6":"1"},{"f7":"1"}]
}
 
{
    "idxcd":{"$in":["FD_GN_BC","BC"]},"div":{"$exists":true}
}

{ "tick" : { "$in" : [ "600237" , "600219" , "600219" ]} , "dt" : { "$gte" : "2007-03-01" , "$lte" : "2007-12-21"}}

查询2006年份的,secu以0和3和6打头的
{     
  "y":{"$regex":"2006"},"typ": "预计扭亏",
  "$or":[{"secu":/^0/},{"secu":/^3/},{"secu":/^6/}]
}

{
    "upt":{"$gte":ISODate("2017-06-22T04:57:03.835Z")}
}

{
    "analyst":{"$nin":[[]]}
}


{ 
    "dt" : { "$gte" : "2015-07-20" , "$lte" : "2017-11-2"} , 
    "$or" : [ { "coms" : { "$in" : [ "铜陵有色金属集团控股有限公司" ,]}} , { "inds" : { "$in" : [ "房地产业" ]}}]
}


以什么结尾  模糊查询多个
{
    "name":{"$regex":"^.*拆借利率上升$|^.*产量增加|^.*加息$|^.*会议$"}
}

{
    "mkt.code":{"$in": ["1001","1002","1003","1005","1012"]}
}
{
    "publisher":{"$ne": "CSF"}
}
{
    "secu": {"$not":/SH_EQ|SZ_EQ|QS_EQ|HK_EQ/}
}
{
    "secu": /SH_EQ|SZ_EQ/,"fp":{$gte:"2015"}, "tik": {$not:/^20|^90/}
}
{
    "secu": {"$not":/SH_EQ|SZ_EQ/},"fp":{$lt:"2015"},"tik": /^20|^90/
}
{
    "mkt.code":/1001|1002|1003|1012|1005|1008|1006|1007/,"ls.dt":{$ne:null},
    "fp":{$gte:"2015"}, "secu": {$not:/^20|^90/}
}

{
    "fp":{$lt:"2015"},"secu": /^20|^90/
}