I am playing around with MongoDB trying to figure out how to do a simple
SELECT province, COUNT(*) FROM contest GROUP BY province
But I can
Mongo shell command that worked for me:
db.getCollection().aggregate([{"$match": {'': ''}}, {"$group": {'_id': {'': "$group_by_attribute"}}}])