消除重復(fù) 方法distinct()對(duì)數(shù)據(jù)進(jìn)行去重 語法 db.集合名稱.distinct('去重字段',{條件}) 例1:查找年齡大于18的性別(去重) db.stu.distinct('gender',{age:{$gt:18}})