Created
October 15, 2014 04:54
-
-
Save Imater/6a0e9a71bec5040a0655 to your computer and use it in GitHub Desktop.
Mongo agregate and distinct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.CommonHeaderRule.aggregate({$group: {_id: "$Titles", count: {$sum:1}}}, {$sort: {count:-1}}) | |
db.AssortmentHeaderRule.count() | |
db.AssortmentHeaderRule.distinct("Title") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment