This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collName= 20180302 | |
// 2018-03-02 00:00:00 to | |
// 2018-03-02 23:59:59 | |
var dateRange= {"$gte":1519948800,"$lte":1520035199} | |
var queryDoc; queryDoc.signed_up_at = dateRange | |
var paid = "59deb60085a3c22795133b02" | |
var free = "59dfe40a0a5037ff1c0bd8af" | |
queryDoc["segments.segments.id"] = paid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collName= 20180419 | |
// 2018-04-18 00:00:00 to | |
// 2018-04-18 23:59:59 | |
var dateRange= {"$gte":1524009600,"$lte":1524095999} | |
// ----------------------------------------------------- | |
var queryDoc040506={}; queryDoc040506.signed_up_at = dateRange | |
db.getCollection(`${collName}`) | |
.aggregate([ { $match: { signed_up_at: dateRange } } ,{ $group: { _id : "$custom_attributes.api_experience_level",/*'Plan Names': { $addToSet: { api_plan_name : "$custom_attributes.api_plan_name"}}, */ "Sum" : {"$sum":1} } } ,{ $sort:{_id : 1} } ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collName= 20180419 | |
// 2018-04-18 00:00:00 to | |
// 2018-04-18 23:59:59 | |
var dateRange= {"$gte":1524009600,"$lte":1524095999} | |
// ----------------------------------------------------- | |
var queryDoc03={}, segments= { "id": "5a709f20e8a46fcd9c0c5d37","name": "_HAS ACTIVITY"} | |
queryDoc03.signed_up_at= dateRange | |
queryDoc03.last_request_at= dateRange | |
queryDoc03["segments.segments.id"]= {$ne:segments.id} | |
db.getCollection(`${collName}`).aggregate([ { $match: queryDoc03 }, { "$group": {"_id": null, /* 'Plan Names': { $addToSet: { api_plan_name : "$custom_attributes.api_plan_name"}}, */ "Total Non-Activity": {"$sum": 1} } } ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collName= 20180301 | |
// 2018-03-01 00:00:00 to | |
// 2018-03-01 23:59:59 | |
var dateRange= {"$gte":1519862400,"$lte":1519948799} | |
var queryDoc; queryDoc.signed_up_at = dateRange | |
var segments = { | |
"id": "5a709f20e8a46fcd9c0c5d37", | |
"name": "_HAS ACTIVITY" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collName= 20180301 | |
// 2018-03-01 00:00:00 to | |
// 2018-03-01 23:59:59 | |
var dateRange= {"$gte":1519862400,"$lte":1519948799} | |
var queryDoc; queryDoc.signed_up_at = dateRange | |
db.getCollection(`${collName}`) | |
.aggregate([ | |
{ $match: queryDoc } | |
,{ $group: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collName= 20180301 | |
// 2018-03-01 00:00:00 to | |
// 2018-03-01 23:59:59 | |
var dateRange= {"$gte":1519862400,"$lte":1519948799} | |
var queryDoc; queryDoc.signed_up_at = dateRange | |
db.getCollection(`${collName}`).aggregate([ | |
{ "$match": queryDoc } | |
,{ "$group":{ "_id" : null, | |
// "Plan Names": { "$addToSet": { "api_plan_name" : "$custom_attributes.api_plan_name"}}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --request POST \ | |
--url https://hooks.slack.com/services/T06EH0294/B1VJZGDKQ/43L... \ | |
--header 'cache-control: no-cache' \ | |
--form 'payload={"new-bot-name":"Agenda","username": "Agenda","icon_emoji":":googledoc:","text": "<{Place Doc Here}|Google Doc : 2016 - Weekly Apps - API Meeting>"}' |
NewerOlder