paolov Posted February 15, 2018 Share Posted February 15, 2018 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now