AnsweredAssumed Answered

Mongodb Input: How to query multiple queries?

Question asked by Shailesh royyuru on Mar 2, 2018

Hi,

 

I am trying to query multiple queries on the same collection. How can I do it?

 

What I am trying to achieve is:

1) Query the whole collection and get only specific fields from the collection.

2) Query it only for last 30 days.

 

Query:( Not sure if the query is correct)

 

{created:{$gte:{$date:"2017-12-31T01:04:22Z"}}},

{},{name:1,senderName:1,senderEmail:1,settings.lastSentDate:1,company:1,modified:1,recipientList:1,created:1}

 

 

The query I am using doesnt throw any error but also doesnt fetch any results.

But if I use the queries individually. The queries work perfectly with the resulted outcomes.

 

Please help. Thanks in advance.

Outcomes