Follow these steps to install graphite on OS X Mavericks.
- Homebrew
- Python 2.7
- Git
//equivalent of "select count (distinct fieldName) from someTable" | |
db.someCollection.aggregate([{ $group: { _id: "$fieldName"} },{ $group: { _id: 1, count: { $sum: 1 } } } ]) |