/* All crawled sites which contain mi (mi.* or */mi) in the URL path. db.Websites.aggregate([ { $match: {urlContainsLangCodeInPath: true} }, { $unwind: "$geoLocationCountryCode" }, { $group: { _id: "$geoLocationCountryCode", count: { $sum: 1 } } }, { $sort : { count : -1} } ]); */ /* 1 */ { "_id" : "us", "count" : 408.0 } /* 2 */ { "_id" : "cn", "count" : 123.0 } /* 3 */ { "_id" : "fr", "count" : 34.0 } /* 4 */ { "_id" : "unknown", "count" : 19.0 } /* 5 */ { "_id" : "nz", "count" : 14.0 } /* 6 */ { "_id" : "de", "count" : 12.0 } /* 7 */ { "_id" : "nl", "count" : 8.0 } /* 8 */ { "_id" : "hk", "count" : 7.0 } /* 9 */ { "_id" : "au", "count" : 7.0 } /* 10 */ { "_id" : "ca", "count" : 7.0 } /* 11 */ { "_id" : "gb", "count" : 5.0 } /* 12 */ { "_id" : "jp", "count" : 5.0 } /* 13 */ { "_id" : "ua", "count" : 4.0 } /* 14 */ { "_id" : "ru", "count" : 4.0 } /* 15 */ { "_id" : "vg", "count" : 2.0 } /* 16 */ { "_id" : "sg", "count" : 2.0 } /* 17 */ { "_id" : "dk", "count" : 2.0 } /* 18 */ { "_id" : "se", "count" : 1.0 } /* 19 */ { "_id" : "ie", "count" : 1.0 } /* 20 */ { "_id" : "es", "count" : 1.0 } /* 21 */ { "_id" : "tr", "count" : 1.0 } /* 22 */ { "_id" : "za", "count" : 1.0 } /* 23 */ { "_id" : "cz", "count" : 1.0 } /* 24 */ { "_id" : "eu", "count" : 1.0 }