我目前正在使用MongoChef(4.3.0)访问Azure文档数据库(usingDocumentDBprotocolsupportforMongoDB)。有问题的数据来自ApplicationInsights连续导出,其中包含以下类型的数据(那里还有其他数据,但这是我感兴趣的关键部分......){...otherfields..."request":[{"name":"GET/images/loading_man.gif","count":NumberInt(1),"responseCode":NumberInt(200),"success":NumberInt(1),"url":
使用MongoChef聚合,如果您有以下数据:{_id:1,Mnt:2016-05-01,Score:85}{_id:2,Mnt:2016-05-01,Score:85}{_id:3,Mnt:2016-03-01,Score:80}{_id:4,Mnt:2016-03-01,Score:80}{_id:5,Mnt:2016-03-01,Score:80}{_id:6,Mnt:2016-01-01,Score:75}并且想要:计算集合中的最大月份(即M1:2016年5月),按“Mnt”分组-可能不是连续的最近几个月,例如以上最新/最大3个月的集合是:2016-5月、2016-3月、201