mongoDB 學習筆記(四)數據庫命令、固定集合、GridFS文件系統

Count+Distinct+Group Count關鍵字:請查詢persons中美國學生的人數。 db.persons.find({country:"USA"}).count() Distinct關鍵字: 請查詢出persons中一共有多少個國家分別是什麼。 db.runCommand({distinct:"persons",key:"country"}).values Group關鍵字:請查出
相關文章
相關標籤/搜索