I have a query:
db.test.aggregate( {$group : { _id : \'$key\', frequency: { $sum : 1 } } } )
This will get the frequency of every enumeration o