Skip to content

Instantly share code, notes, and snippets.

View anapaulagomes's full-sized avatar

Ana Paula Gomes anapaulagomes

View GitHub Profile
@anapaulagomes
anapaulagomes / gist:18be9028e92b5033c0b4
Last active December 29, 2020 15:37
Agrupa e calcula a média com aggregate - MongoDB
db.zips.aggregate([
{
$match: {
$and : [
{ $or: [ { state: 'XX' }, { state: 'YY' } ] }, { pop: {$gte: 25000}}
]}
},
{
$group:
{