SHARE
TWEET

request

obez Aug 5th, 2016 (edited) 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. db.getCollection('tost').aggregate(
  2. [
  3.     {
  4.         "$group":{
  5.             "_id": "$_id",
  6.             "doc_info":{
  7.                 "$first": "$doc_info"
  8.             },
  9.             "wa_count": {
  10.                 "$first": {
  11.                     "$size": "$wa"
  12.                 }
  13.             },
  14.             "ax_count": {
  15.                 "$first": {
  16.                     "$size": "$wa.ax"
  17.                 }
  18.             }
  19.         }
  20.     }
  21. ])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top