1

I don't understand how to implement the following query via MongoDb :

I need to take a count of documents but with condition that only one document will be taken for each time span which equals 30 minutes. I.e. if in 60 minutes time span i have two documents then i need to add only one in total count. Each document will contain created field that contains mentioned date. I have MongoDb v. 3.0.2 and c# MongoDb driver v. 2.0 but will be enough if you give me an advice how to implement it via native MongoDb query.

Vladyslav Furdak
  • 1,765
  • 2
  • 22
  • 46
  • Also added [my own take](http://stackoverflow.com/a/32137234/5031275) there on the duplicate on returning as valid BSON `Date` type for translation in any language impelementation as a result. – Blakes Seven Aug 21 '15 at 09:44

0 Answers0