juhi bhatia
unread,Aug 16, 2012, 8:42:33 AM8/16/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com, at...@entrib.com
I can do a mongodb aggregation query like:
db.elements.aggregate({$project : {"weekId" : 1, "monthId" : 1}}, {$match : {"weekId" : {$gt : 3*4}}})
the above query gives correct results.
I am trying to fire the query below:
db.elements.aggregate({$project : {"weekId" : 1, "monthId" : 1}}, {$match : {"weekId" : {$gt : "monthId" * 4}}})
the query evaluates w/o any errors, but does not give correct answer. I also tried "$monthId" instead of "monthId", I get the same results but incorrect.
My question is, can i do something like that in mongodb aggregation? If yes, what is the correct query mechanism?