title: Query on MongoDB-Java Fetch Embedded node details
body: <p>I have 100 documents of customer data. Each document have 300 transactions in them. So in total there are 3000 transaction for 100 customers.</p>
  
  <p>Now if I need to retrieve top 10 transactions done recently irrespective of any customers, how can I do this with MongoDB and Java?
  Please </p>
  
  <p>Example:</p>
  
  <p><pre><code>{
  'customer':{
              'custId':111,
              ...
              ...,
              {
              'transactions':{
                          'tid':'t001',
                          'tname':'purchase',
                          'amt':'5000'
              },
              'transactions':{
                          'tid':'t002',
                          'tname':'credit',
                          'amt':'15000'
              },
              'transactions':{
                          'tid':'t001',
                          'tname':'debit',
                          'amt':'6500'
              }
              }</p>
  
  <p>},
  'customer':{
          'custId':112,
              ...
              ...
              {
              'transactions':{
                          'tid':'t011',
                          'tname':'purchase',
                          'amt':'51000'
              },
              'transactions':{
                          'tid':'t002',
                          'tname':'credit',
                          'amt':'15200'
              },
              'transactions':{
                          'tid':'t001',
                          'tname':'debit',
                          'amt':'6509'
              }
              }
  }
  'customer':{
          'custId':113,
              ...
              ...
              {
              'transactions':{
                          'tid':'t001',
                          'tname':'purchase',
                          'amt':'5900'
              },
              'transactions':{
                          'tid':'t3302',
                          'tname':'credit',
                          'amt':'18000'
              },
              'transactions':{
                          'tid':'t401',
                          'tname':'debit',
                          'amt':'5800'
              }
              }
  }
  ...</p>
  
  <p>}</pre></code></p>
  
  <p>Expected Result: 
  Top 10 transactions details from 100 customers </p>