Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1069

aggregation query from 2 tables

      we have a schema:

      stores:
      {_id , name}
      getways:
      {_id, store_id }
      txes:

      {tx_id,getway_id}

      store has many getways, and getway has many txes.

      We need count of txes for specific store.

      in sql:

      select count
      from txes
      where getway_id in
      ( select _id
      from getways
      where store_id = xxxx)

      How can I write it in mongo query?

      I write this query in jaspersoft studio mongo query.

      Thanks for your help

            Assignee:
            Unassigned Unassigned
            Reporter:
            litalch@3base.co.il lital
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: