documentdb-lumenize icon indicating copy to clipboard operation
documentdb-lumenize copied to clipboard

Porting from MongoDB to DocumentDB

Open gmkhalid opened this issue 8 years ago • 0 comments

Hi Larry,

I am in the process of porting from MongoDB to DocumentDB, I came across lumenize. How could we write this aggregate expression in lumenize?

{ $match:{$and:[{"Id":"A99999999"}, {$or:[ {$and:[{'dw.f':null}, {T1:{'$lt':1415923200000}} ]}, {$and:[{'dw.f':null}, {T1:{"$gte":1415923200000, "$lte":1416009599999}} ]} ]} ]}}, { $group:{_id: {Id:"$Id", dt:{$subtract:[{$add:["$T1",-19800000]},{$mod:[{$add:["$T1",-19800000]},86400000]}]}}, td:{$sum:"$Dis"} }}

gmkhalid avatar Dec 15 '16 19:12 gmkhalid