First Commit

This commit is contained in:
Luke Berndt
2020-06-09 22:11:11 -04:00
parent 8f49aa463c
commit 3b0d3f290f
551 changed files with 193130 additions and 2 deletions

28
mongo/totals.js Normal file
View File

@@ -0,0 +1,28 @@
db = db.getMongo().getDB( "scanner" );
var results = db.calls.aggregate(
[ {
$project: {
len: true,
year: {$year: "$time"},
month: {$month: "$time"},
dayOfMonth: {$dayOfMonth: "$time"}
}
},
{
$group:
{
_id: {
year: '$year',
month: '$month',
dayOfMonth: '$dayOfMonth'
},
totalAudio: { $sum: "$len" },
count: { $sum: 1 }
}
}
]
)
results.forEach(function(document) {
printjson(document);
});