Jump to content
We've recently updated our Privacy Statement, available here ×

[MongoDB] Does Jasper support $in with values from another query?


paolov

Recommended Posts

Simple question: is it possibile to replicate this mongodb query in Jasper?

db.getCollection('stock').aggregate([    {$match:{        CODE: {$in:db.getCollection('books').distinct("CODE",{                            ID_GROUP:1012,                        })},        ID_STORE:"00001"    }},    {$group:{        _id:"$ID_STORE",        amtP: {$sum:"$QTY"}    }}])[/code]

The query fetch the number of books, belongings to the group 1012 , left in the store 00001.
If it's possibile, how should a write that in jasper? cause i really can't figure it out how to put the "$in" argument.

Thanks

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...