I want to join/group differents collections in one

Hello, I have a query that return me something like that(I am also using Compass to see the results) :

[ { subscribers: [...] }, { subscribers: [...] }, ... ]

but what I want is to join al that “sub-arrays” called “subscribers” in one only array in an aggregation but I don’nt know how to do that. This is my code:

return this.subscriptions
        .aggregate([
            {
              '$match': {
                'entity': params.entity, 
                'status': 'active'
              }
            }, 
            {
              '$lookup': {
                'from': 'appsubscriptionssubscribers', 
                'localField': '_id', 
                'foreignField': 'subscription', 
                'as': 'subscribers'
              }
            }, 
            {
              '$match': {
                'subscribers.0': {
                  '$exists': true
                }
              }
            },
            { $skip : batch.skip },
            { $limit : batch.size },  
            {
              '$project': {
                '_id': 0, 
                'subscribers': 1
              }
            }
          ])
          .toArray();
  }

What can I do to achieve that? Thank you in advance.

Hi @Ariel_P and welcome in the MongoDB Community :muscle: !

I think I see what you want to do and I think I can do it.

Can you please provide a few sample documents (just the relevant fields (especially the IDs)) from subscriptions and appsubscriptionssubscribers so I can try.

If you could also provide the expected output based on these few sample docs, it would be perfect.

Bonus points if I just have to db.coll.insertMany(<copy/paste>) to insert them in my cluster.

Cheers,
Maxime.

1 Like

I would try that, it is my first time so, here we go, this is “subscriptions” and “appsubscriptionssubscribers”:

   "_id": {
       "$oid": "5eec3928d5fb583beb63ecee"
   },
   "uid": "SsBO0x4yl",
   "type": "dynamic",
   "interval": "1m",
   "limit": 0,
   "trial": 0,
   "initialDay": -1,
   "shorten_url": "http://mb",
   "return_url": "https://speryans.com",
   "webhook": "https://sperya",
   "currency": "ARS",
   "status": "active",
   "customerForm": "default",
   "features": [],
   "entity": {
       "$oid": "577660654629781000df9552"
   },
   "name": "Nombre Suscripción",
   "description": "Mi suscripción 1",
   "reference": "SsBO0x4yl",
   "total": 1,
   "options": {
       "button": false,
       "embed": false,
       "domain": "midominio.com",
       "theme": {
           "type": "light",
           "background": "",
           "showHeader": true,
           "header": false,
           "colors": {
               "primary": "#6f00ff"
           }
       }
   },
   "created": {
       "$date": "2020-06-19T04:03:52.558Z"
   },
   "updated": {
       "$date": "2020-06-19T04:03:52.568Z"
   },
   "agenda": [],
   "__v": 0,
   "intent": "payment.v2"
}

{
   "_id": {
       "$oid": "5bf36db84bcbac7920daa39f"
   },
   "uid": "oLb8ThhVt",
   "type": "dynamic",
   "interval": "1m",
   "limit": 5,
   "trial": 1,
   "initialDay": -1,
   "shorten_url": "http://m",
   "currency": "ARS",
   "status": "active",
   "entity": {
       "$oid": "577660654629781000df9552"
   },
   "description": "Esto es otra cosa",
   "total": 10,
   "agenda": [],
   "created": {
       "$date": "2018-11-20T02:13:12.588Z"
   },
   "updated": {
       "$date": "2018-11-20T02:13:12.588Z"
   },
   "__v": 0,
   "name": "Esto es otra cosa",
   "return_url": "https://speryans.com/thanks",
   "customerForm": "custom:80rV25rvb",
   "intent": "payment.v2"
}

{
   "_id": {
       "$oid": "5ea6067f104d8ceff26da0df"
   },
   "uid": "P2434fDxJ",
   "type": "dynamic",
   "interval": "1m",
   "limit": 12,
   "trial": 0,
   "initialDay": -1,
   "shorten_url": "http:",
   "return_url": "",
   "webhook": "https://webhook.site/c1820828-6cea-4113-8480-c4df83bbc394",
   "currency": "ARS",
   "status": "active",
   "customerForm": "default",
   "entity": {
       "$oid": "5761a3dd8aad6c120042b287"
   },
   "name": "Nombre Suscripción",
   "description": "Mi suscripción 1",
   "reference": "P2434fDxJ",
   "total": 100,
   "created": {
       "$date": "2020-04-26T22:09:03.788Z"
   },
   "updated": {
       "$date": "2020-04-26T22:09:03.801Z"
   },
   "agenda": [],
   "__v": 0,
   "intent": "payment.v2",
   "notes": ""
} 


...and this is "appsubscriptionssubscribers": 




{
   "_id": {
       "$oid": "5fc521659d588f6ab03661ff"
   },
   "uid": "FX8BBAH3VBH8T8051D",
   "reference": "FX8BBAH3VBH8T8051D",
   "total": 0,
   "setupFee": 0,
   "test": false,
   "customerData": {
       "_id": "5b8dd7bf26d681000f90bc20",
       "name": "Mijo",
       "identification": "33996953",
       "email": "a@a.com",
       "phone": "12123123",
       "uid": "33996953",
       "tired_lobot": "logical_ayla_secura",
       "purple_biggs_darklighter": "1988-10-13"
   },
   "sources": [],
   "subscription": {
       "$oid": "5bf36db84bcbac7920daa39f"
   },
   "status": "active",
   "customer": {
       "$oid": "5b8dd7bf26d681000f90bc20"
   },
   "startDate": {
       "$date": "2020-11-30T16:44:21.867Z"
   },
   "agenda": [{
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366200"
       },
       "day": 30,
       "month": 10,
       "period": 1
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366201"
       },
       "day": 30,
       "month": 11,
       "period": 2
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366202"
       },
       "day": 30,
       "month": 0,
       "period": 3
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366203"
       },
       "day": 28,
       "month": 1,
       "period": 4
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366204"
       },
       "day": 28,
       "month": 2,
       "period": 5
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366205"
       },
       "day": 28,
       "month": 3,
       "period": 6
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366206"
       },
       "day": 28,
       "month": 4,
       "period": 7
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366207"
       },
       "day": 28,
       "month": 5,
       "period": 8
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366208"
       },
       "day": 28,
       "month": 6,
       "period": 9
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366209"
       },
       "day": 28,
       "month": 7,
       "period": 10
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab036620a"
       },
       "day": 28,
       "month": 8,
       "period": 11
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab036620b"
       },
       "day": 28,
       "month": 9,
       "period": 12
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab036620c"
       },
       "day": 28,
       "month": 10,
       "period": 13
   }],
   "customerToken": [{
       "active": true,
       "_id": {
           "$oid": "5fc521669d588f6ab036620f"
       },
       "token": {
           "$oid": "5fc521249d588f6ab03661e4"
       }
   }],
   "executions": [{
       "created": {
           "$date": "2020-11-30T16:44:21.867Z"
       },
       "period": 0,
       "status": "trial",
       "type": "registration",
       "uid": "2YGXXOENTH0X6EETU1",
       "reference": "",
       "currency": "ARS",
       "total": 10,
       "_id": {
           "$oid": "5fc521659d588f6ab036620d"
       },
       "day": 30,
       "month": 10,
       "year": 2020,
       "subscription": {
           "$oid": "5bf36db84bcbac7920daa39f"
       }
   }],
   "created": {
       "$date": "2020-11-30T16:44:21.870Z"
   },
   "updated": {
       "$date": "2020-11-30T16:44:21.875Z"
   },
   "__v": 0
},

{
   "_id": {
       "$oid": "5fc521659d588f6ab03661ff"
   },
   "uid": "FX8BBAH3VBH8T8051D",
   "reference": "FX8BBAH3VBH8T8051D",
   "total": 0,
   "setupFee": 0,
   "test": false,
   "customerData": {
       "_id": "5b8dd7bf26d681000f90bc20",
       "name": "Mijo",
       "identification": "33996953",
       "email": "a@a.com",
       "phone": "12123123",
       "uid": "33996953",
       "tired_lobot": "logical_ayla_secura",
       "purple_biggs_darklighter": "1988-10-13"
   },
   "sources": [],
   "subscription": {
       "$oid": "5bf36db84bcbac7920daa39f"
   },
   "status": "active",
   "customer": {
       "$oid": "5b8dd7bf26d681000f90bc20"
   },
   "startDate": {
       "$date": "2020-11-30T16:44:21.867Z"
   },
   "agenda": [{
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366200"
       },
       "day": 30,
       "month": 10,
       "period": 1
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366201"
       },
       "day": 30,
       "month": 11,
       "period": 2
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366202"
       },
       "day": 30,
       "month": 0,
       "period": 3
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366203"
       },
       "day": 28,
       "month": 1,
       "period": 4
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366204"
       },
       "day": 28,
       "month": 2,
       "period": 5
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366205"
       },
       "day": 28,
       "month": 3,
       "period": 6
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366206"
       },
       "day": 28,
       "month": 4,
       "period": 7
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366207"
       },
       "day": 28,
       "month": 5,
       "period": 8
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366208"
       },
       "day": 28,
       "month": 6,
       "period": 9
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab0366209"
       },
       "day": 28,
       "month": 7,
       "period": 10
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab036620a"
       },
       "day": 28,
       "month": 8,
       "period": 11
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab036620b"
       },
       "day": 28,
       "month": 9,
       "period": 12
   }, {
       "type": "period",
       "year": 0,
       "_id": {
           "$oid": "5fc521659d588f6ab036620c"
       },
       "day": 28,
       "month": 10,
       "period": 13
   }],
   "customerToken": [{
       "active": true,
       "_id": {
           "$oid": "5fc521669d588f6ab036620f"
       },
       "token": {
           "$oid": "5fc521249d588f6ab03661e4"
       }
   }],
   "executions": [{
       "created": {
           "$date": "2020-11-30T16:44:21.867Z"
       },
       "period": 0,
       "status": "trial",
       "type": "registration",
       "uid": "2YGXXOENTH0X6EETU1",
       "reference": "",
       "currency": "ARS",
       "total": 10,
       "_id": {
           "$oid": "5fc521659d588f6ab036620d"
       },
       "day": 30,
       "month": 10,
       "year": 2020,
       "subscription": {
           "$oid": "5bf36db84bcbac7920daa39f"
       }
   }],
   "created": {
       "$date": "2020-11-30T16:44:21.870Z"
   },
   "updated": {
       "$date": "2020-11-30T16:44:21.875Z"
   },
   "__v": 0
}

I think that’s what you want but your sample docs didn’t help a lot because the 2nd appsubscriptionssubscribers share the same _id with the 1st one.

You didn’t provide the expected output for this data sample so I’m not sure what I’m aiming for.

Also I think there is a problem of duplicated items like in this example (in the end it’s the same 5bf36db84bcbac7920daa39f sub twice.

Also skip and limit don’t make sense without a $sort ahead of them as your docs are in random orders before then.

[
  {
    '$match': {
      'entity': params.entity, 
      'status': 'active'
    }
  }, {
    '$lookup': {
      'from': 'appsubscriptionssubscribers', 
      'localField': '_id', 
      'foreignField': 'subscription', 
      'as': 'subscribers'
    }
  }, {
    '$match': {
      'subscribers.0': {
        '$exists': true
      }
    }
  }, {
    '$skip': batch.skip
  }, {
    '$limit': batch.size
  }, {
    '$unwind': {
      'path': '$subscribers'
    }
  }, {
    '$group': {
      '_id': null, 
      'subs': {
        '$push': '$$ROOT'
      }
    }
  }, {
    '$project': {
      '_id': 0, 
      'subs': 1
    }
  }
]

I hope it’s what you want.

FYI: As you provided extended JSON format, I had to use mongoimport to insert them in MDB.

Cheers,
Maxime.

I don´t know how to put value on ‘path’ in the Compass because I am making the aggregation in the subscribers collection which the actual name is “apaasubscriptionspplans” . When you said…

FYI: As you provided extended JSON format, I had to use mongoimport to insert them in MDB.

in which format should I show you my data?

The output from Mongosh is easier because I can just copy/paste back into Mongosh for insertion.

{
  _id: ObjectId("5bf36db84bcbac7920daa39f"),
  uid: 'oLb8ThhVt',
  type: 'dynamic',
  interval: '1m',
  limit: 5,
  trial: 1,
  initialDay: -1,
  shorten_url: 'http://m',
  currency: 'ARS',
  status: 'active',
  entity: ObjectId("577660654629781000df9552"),
  description: 'Esto es otra cosa',
  total: 10,
  agenda: [],
  created: ISODate("2018-11-20T02:13:12.588Z"),
  updated: ISODate("2018-11-20T02:13:12.588Z"),
  __v: 0,
  name: 'Esto es otra cosa',
  return_url: 'https://speryans.com/thanks',
  customerForm: 'custom:80rV25rvb',
  intent: 'payment.v2'
}

No big deal though, but you didn’t get the bonus points :wink: !

1 Like

Oh, I didn’t know that, I will do that in mongosh right now. Thanks I need this kind of information and solution.

I don’t understand.

At the moment you are doing a $lookup from the subscriptions collection to the appsubscriptionssubscribers collection. Which results in an array of appsubscriptionssubscribers docs into the subscriptions collection.

You can do the opposite if you like. Or you can also “lookup” (=join) on the same collection if this is what you are after. Totally works.

This is the result in mongosh of my aggregation:

{ subscribers: 
   [ { _id: ObjectId("5fc521659d588f6ab03661ff"),
       uid: 'FX8BBAH3VBH8T8051D',
       reference: 'FX8BBAH3VBH8T8051D',
       total: 0,
       setupFee: 0,
       test: false,
       customerData: 
        { _id: '5b8dd7bf26d681000f90bc20',
          name: 'Mijo',
          identification: '33996953',
          email: 'a@a.com',
          phone: '12123123',
          uid: '33996953',
          tired_lobot: 'logical_ayla_secura',
          purple_biggs_darklighter: '1988-10-13' },
       sources: [],
       subscription: ObjectId("5bf36db84bcbac7920daa39f"),
       status: 'active',
       customer: ObjectId("5b8dd7bf26d681000f90bc20"),
       startDate: 2020-11-30T16:44:21.867Z,
       agenda: 
        [ { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366200"),
            day: 30,
            month: 10,
            period: 1 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366201"),
            day: 30,
            month: 11,
            period: 2 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366202"),
            day: 30,
            month: 0,
            period: 3 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366203"),
            day: 28,
            month: 1,
            period: 4 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366204"),
            day: 28,
            month: 2,
            period: 5 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366205"),
            day: 28,
            month: 3,
            period: 6 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366206"),
            day: 28,
            month: 4,
            period: 7 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366207"),
            day: 28,
            month: 5,
            period: 8 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366208"),
            day: 28,
            month: 6,
            period: 9 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab0366209"),
            day: 28,
            month: 7,
            period: 10 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab036620a"),
            day: 28,
            month: 8,
            period: 11 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab036620b"),
            day: 28,
            month: 9,
            period: 12 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc521659d588f6ab036620c"),
            day: 28,
            month: 10,
            period: 13 } ],
       customerToken: 
        [ { active: true,
            _id: ObjectId("5fc521669d588f6ab036620f"),
            token: ObjectId("5fc521249d588f6ab03661e4") } ],
       executions: 
        [ { created: 2020-11-30T16:44:21.867Z,
            period: 0,
            status: 'trial',
            type: 'registration',
            uid: '2YGXXOENTH0X6EETU1',
            reference: '',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5fc521659d588f6ab036620d"),
            day: 30,
            month: 10,
            year: 2020,
            subscription: ObjectId("5bf36db84bcbac7920daa39f") } ],
       created: 2020-11-30T16:44:21.870Z,
       updated: 2020-11-30T16:44:21.875Z,
       __v: 0 },
     { _id: ObjectId("5c23027e7a62ce19e989eed8"),
       uid: 'SgkjbBCVI',
       reference: 'SgkjbBCVI',
       status: 'active',
       customerData: 
        { name: 'Admin Mobbex',
          identification: '21123123',
          email: 'admin@mobbex.com',
          phone: '15123123' },
       subscription: ObjectId("5bf36db84bcbac7920daa39f"),
       customer: ObjectId("5c22f96a28f81718732c0336"),
       agenda: 
        [ { _id: ObjectId("5c23027e7a62ce19e989eee4"), day: 26, month: 10 },
          { _id: ObjectId("5c23027e7a62ce19e989eee3"), day: 26, month: 11 },
          { _id: ObjectId("5c23027e7a62ce19e989eee2"), day: 26, month: 1 },
          { _id: ObjectId("5c23027e7a62ce19e989eee1"), day: 26, month: 2 },
          { _id: ObjectId("5c23027e7a62ce19e989eee0"), day: 26, month: 3 },
          { _id: ObjectId("5c23027e7a62ce19e989eedf"), day: 26, month: 4 },
          { _id: ObjectId("5c23027e7a62ce19e989eede"), day: 26, month: 5 },
          { _id: ObjectId("5c23027e7a62ce19e989eedd"), day: 26, month: 6 },
          { _id: ObjectId("5c23027e7a62ce19e989eedc"), day: 26, month: 7 },
          { _id: ObjectId("5c23027e7a62ce19e989eedb"), day: 26, month: 8 },
          { _id: ObjectId("5c23027e7a62ce19e989eeda"), day: 26, month: 9 },
          { _id: ObjectId("5c23027e7a62ce19e989eed9"), day: 26, month: 10 } ],
       customerToken: 
        [ { active: true,
            _id: ObjectId("5c23027e7a62ce19e989eee5"),
            customer: ObjectId("5c22f96a28f81718732c0336"),
            token: ObjectId("5c23026b7a62ce19e989eecd"),
            entitySource: ObjectId("5bb0efa2565353000efe2a13"),
            entityInstallment: ObjectId("5baff820565353000efe2814") } ],
       executions: 
        [ { created: 2018-12-25T04:24:30.179Z,
            period: 0,
            status: 'paid',
            uid: 'hj_XcYau7w',
            _id: ObjectId("5c23027e7a62ce19e989eee6"),
            day: 26,
            month: 11 },
          { created: 2018-12-26T04:25:11.875Z,
            period: 1,
            status: 'paid',
            uid: '_nt7Oh1kU',
            _id: ObjectId("5c2302ab7a62ce19e989eef0"),
            day: 26,
            month: 11 },
          { created: 2018-12-27T04:25:11.875Z,
            period: 2,
            status: 'retried',
            uid: '_nt7Oh1kJ',
            day: 27,
            month: 11,
            _id: ObjectId("5c476224cf33037c3f421d08") },
          { created: 2019-01-22T19:26:27.290Z,
            period: 2,
            status: 'retried',
            type: 'manual',
            uid: 'JmUcvDEVR',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5c476e63ba71917da2c6b231"),
            day: 22,
            month: 0 },
          { created: 2019-01-22T19:30:32.584Z,
            period: 2,
            status: 'retried',
            type: 'manual',
            uid: 'ZNolJrhVP',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5c476f586ded2a7dec73f4a3"),
            day: 22,
            month: 0 },
          { created: 2019-01-22T19:34:32.064Z,
            period: 2,
            status: 'retried',
            type: 'manual',
            uid: 'JoVPYElXI',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5c4770485578b17e33ab717b"),
            day: 22,
            month: 0 },
          { created: 2019-01-22T19:36:36.457Z,
            period: 2,
            status: 'paid',
            type: 'manual',
            uid: 'YJbQt5tN9',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5c4770c4e9e4f27e4b516daa"),
            day: 22,
            month: 0 } ],
       created: 2018-12-26T04:24:30.186Z,
       updated: 2018-12-26T04:24:30.186Z,
       __v: 0,
       total: 10,
       startDate: 2018-11-26T03:00:00.000Z },
     { _id: ObjectId("5c22e6d6fb82c614eaec2c9a"),
       uid: 'NThbeRUcC',
       reference: 'NThbeRUcC',
       status: 'active',
       customerData: 
        { name: 'Hola Prueba',
          identification: '12123123',
          email: 'demo@mobbex.com',
          phone: '15123123' },
       subscription: ObjectId("5bf36db84bcbac7920daa39f"),
       customer: ObjectId("5bf4d1a1d9641a151c0cc65b"),
       agenda: 
        [ { _id: ObjectId("5c22e6d6fb82c614eaec2ca6"), day: 25, month: 11 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2ca5"), day: 25, month: 0 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2ca4"), day: 25, month: 1 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2ca3"), day: 25, month: 2 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2ca2"), day: 25, month: 3 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2ca1"), day: 25, month: 4 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2ca0"), day: 25, month: 5 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2c9f"), day: 25, month: 6 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2c9e"), day: 25, month: 7 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2c9d"), day: 25, month: 8 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2c9c"), day: 25, month: 9 },
          { _id: ObjectId("5c22e6d6fb82c614eaec2c9b"), day: 25, month: 10 } ],
       customerToken: 
        [ { active: true,
            _id: ObjectId("5c22e6d6fb82c614eaec2ca7"),
            customer: ObjectId("5bf4d1a1d9641a151c0cc65b"),
            token: ObjectId("5c22e61dfb82c614eaec2c91"),
            entitySource: ObjectId("5bb0efa2565353000efe2a19"),
            entityInstallment: ObjectId("5bb0ef65565353000efe2a0c") } ],
       executions: 
        [ { created: 2018-12-26T02:26:30.867Z,
            period: 0,
            status: 'paid',
            uid: '5XQTqRDrm',
            _id: ObjectId("5c22e6d6fb82c614eaec2ca8"),
            day: 25,
            month: 11 } ],
       created: 2018-12-26T02:26:30.881Z,
       updated: 2018-12-26T02:26:30.881Z,
       __v: 0,
       startDate: 2018-12-25T03:00:00.000Z },
     { _id: ObjectId("5ed4b77e73b75e74a675e0c7"),
       uid: 'T0~Q0nMyz',
       reference: 'T0~Q0nMyz',
       total: 0,
       test: false,
       customerData: 
        { name: 'Roman A Sarria',
          email: 'agustin478@gmail.com',
          identification: '33996953',
          phone: '12123123' },
       subscription: ObjectId("5bf36db84bcbac7920daa39f"),
       status: 'active',
       customer: ObjectId("5b9ab217f25fd4000ec200e6"),
       agenda: 
        [ { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0c8"),
            day: 1,
            month: 5,
            period: 1 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0c9"),
            day: 1,
            month: 6,
            period: 2 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0ca"),
            day: 1,
            month: 7,
            period: 3 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0cb"),
            day: 1,
            month: 8,
            period: 4 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0cc"),
            day: 1,
            month: 9,
            period: 5 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0cd"),
            day: 1,
            month: 10,
            period: 6 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0ce"),
            day: 1,
            month: 11,
            period: 7 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0cf"),
            day: 1,
            month: 0,
            period: 8 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0d0"),
            day: 1,
            month: 1,
            period: 9 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0d1"),
            day: 1,
            month: 2,
            period: 10 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0d2"),
            day: 1,
            month: 3,
            period: 11 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5ed4b77e73b75e74a675e0d3"),
            day: 1,
            month: 4,
            period: 12 } ],
       customerToken: 
        [ { active: true,
            _id: ObjectId("5ed4b77e73b75e74a675e0d5"),
            token: ObjectId("5ed4b77073b75e74a675e0b6") } ],
       executions: 
        [ { created: 2020-06-01T08:08:30.153Z,
            period: 0,
            status: 'trial',
            type: 'registration',
            uid: 'K1q4EEydQ5',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5ed4b77e73b75e74a675e0d4"),
            day: 1,
            month: 5,
            year: 2020,
            subscription: ObjectId("5bf36db84bcbac7920daa39f") } ],
       created: 2020-06-01T08:08:30.155Z,
       updated: 2020-06-01T08:08:30.176Z,
       __v: 0,
       startDate: 2020-06-01T03:00:00.000Z },
     { _id: ObjectId("5f01f8597e3620344a6f7431"),
       uid: 'l2IuPVqVa',
       reference: 'l2IuPVqVa',
       total: 0,
       test: false,
       customerData: 
        { name: 'Sarria Roman Agustin',
          email: 'roman@mobbex.com',
          identification: '33996953',
          phone: '12123123' },
       subscription: ObjectId("5bf36db84bcbac7920daa39f"),
       status: 'active',
       customer: ObjectId("5b9ab217f25fd4000ec200e6"),
       agenda: 
        [ { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf141"),
            day: 7,
            month: 6,
            period: 1 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf142"),
            day: 6,
            month: 7,
            period: 2 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf143"),
            day: 5,
            month: 8,
            period: 3 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf144"),
            day: 5,
            month: 9,
            period: 4 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf145"),
            day: 5,
            month: 10,
            period: 5 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf146"),
            day: 5,
            month: 11,
            period: 6 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf147"),
            day: 5,
            month: 0,
            period: 7 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf148"),
            day: 5,
            month: 1,
            period: 8 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf149"),
            day: 5,
            month: 2,
            period: 9 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf14a"),
            day: 5,
            month: 3,
            period: 10 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf14b"),
            day: 5,
            month: 4,
            period: 11 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5f571bec8a2785b2f8bdf14c"),
            day: 5,
            month: 5,
            period: 12 } ],
       customerToken: 
        [ { active: false,
            _id: ObjectId("5f01f8597e3620344a6f743f"),
            token: ObjectId("5f01f8407e3620344a6f7420") },
          { active: true,
            _id: ObjectId("5f4700352210897614a48c2e"),
            token: ObjectId("5f4700322210897614a48c1c") } ],
       executions: 
        [ { created: 2020-07-05T15:57:13.302Z,
            period: 0,
            status: 'retried',
            type: 'registration',
            uid: 'JkWZGLR5OU',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5f01f8597e3620344a6f743e"),
            day: 5,
            month: 6,
            year: 2020,
            subscription: ObjectId("5bf36db84bcbac7920daa39f") },
          { created: 2020-09-08T05:43:55.304Z,
            period: -1,
            status: 'paid',
            type: 'manual',
            uid: 'rAfgg1fB88',
            reference: '',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5f571a1b8a2785b2f8bdf10d"),
            day: 8,
            month: 8,
            year: 2020,
            subscription: ObjectId("5bf36db84bcbac7920daa39f") },
          { created: 2020-11-18T04:53:00.356Z,
            period: 0,
            status: 'paid',
            type: 'cron',
            uid: 'B768YEIYR45MZEQ6R8',
            reference: '',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5fb4a8acabe27427387cd935"),
            day: 18,
            month: 10,
            year: 2020,
            subscription: ObjectId("5bf36db84bcbac7920daa39f") } ],
       created: 2020-07-05T15:57:13.307Z,
       updated: 2020-07-05T15:57:13.313Z,
       __v: 0,
       startDate: 2020-07-07T03:00:00.000Z },
     { _id: ObjectId("5efb6a84853a0348789c0865"),
       uid: '4ucsbBkp~',
       reference: '4ucsbBkp~',
       total: 0,
       test: false,
       customerData: 
        { name: 'Sarria Roman Agustin',
          email: 'roman@mobbex.com',
          identification: '33996953',
          phone: '12123123' },
       subscription: ObjectId("5bf36db84bcbac7920daa39f"),
       status: 'active',
       customer: ObjectId("5b9ab217f25fd4000ec200e6"),
       agenda: 
        [ { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c0866"),
            day: 30,
            month: 5,
            period: 1 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c0867"),
            day: 30,
            month: 6,
            period: 2 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c0868"),
            day: 30,
            month: 7,
            period: 3 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c0869"),
            day: 30,
            month: 8,
            period: 4 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c086a"),
            day: 30,
            month: 9,
            period: 5 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c086b"),
            day: 30,
            month: 10,
            period: 6 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c086c"),
            day: 30,
            month: 11,
            period: 7 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c086d"),
            day: 30,
            month: 0,
            period: 8 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c086e"),
            day: 28,
            month: 1,
            period: 9 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c086f"),
            day: 28,
            month: 2,
            period: 10 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c0870"),
            day: 28,
            month: 3,
            period: 11 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c0871"),
            day: 28,
            month: 4,
            period: 12 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5efb6a84853a0348789c0872"),
            day: 28,
            month: 5,
            period: 13 } ],
       customerToken: 
        [ { active: true,
            _id: ObjectId("5efb6a85853a0348789c0874"),
            token: ObjectId("5efb6a76853a0348789c0854") } ],
       executions: 
        [ { created: 2020-06-30T16:38:28.904Z,
            period: 0,
            status: 'deleted',
            type: 'registration',
            uid: 'pcsTgx~zuH',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5efb6a84853a0348789c0873"),
            day: 30,
            month: 5,
            year: 2020,
            subscription: ObjectId("5bf36db84bcbac7920daa39f") } ],
       created: 2020-06-30T16:38:28.905Z,
       updated: 2020-06-30T16:38:28.911Z,
       __v: 0,
       startDate: 2020-06-30T03:00:00.000Z },
     { _id: ObjectId("5fc522d79d588f6ab036622d"),
       uid: '13YJHY1YWCNI6WAOQF',
       reference: '13YJHY1YWCNI6WAOQF',
       total: 0,
       setupFee: 0,
       test: false,
       customerData: 
        { name: 'Mijo 3',
          identification: '33996953',
          email: 'a@a.com',
          tired_lobot: 'logical_ayla_secura',
          purple_biggs_darklighter: '2020-12-03T09:54:33.787Z' },
       sources: [],
       subscription: ObjectId("5bf36db84bcbac7920daa39f"),
       status: 'active',
       customer: ObjectId("5b8dd7bf26d681000f90bc20"),
       startDate: 2020-11-30T16:50:31.185Z,
       agenda: 
        [ { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab036622e"),
            day: 30,
            month: 10,
            period: 1 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab036622f"),
            day: 30,
            month: 11,
            period: 2 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366230"),
            day: 30,
            month: 0,
            period: 3 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366231"),
            day: 28,
            month: 1,
            period: 4 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366232"),
            day: 28,
            month: 2,
            period: 5 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366233"),
            day: 28,
            month: 3,
            period: 6 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366234"),
            day: 28,
            month: 4,
            period: 7 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366235"),
            day: 28,
            month: 5,
            period: 8 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366236"),
            day: 28,
            month: 6,
            period: 9 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366237"),
            day: 28,
            month: 7,
            period: 10 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366238"),
            day: 28,
            month: 8,
            period: 11 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab0366239"),
            day: 28,
            month: 9,
            period: 12 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc522d79d588f6ab036623a"),
            day: 28,
            month: 10,
            period: 13 } ],
       customerToken: 
        [ { active: false,
            _id: ObjectId("5fc522d79d588f6ab036623c"),
            token: ObjectId("5fc522c89d588f6ab0366214") },
          { active: true,
            _id: ObjectId("5fdc19f0c53befa954817b0a"),
            token: ObjectId("5fdc19ebc53befa954817af1") } ],
       executions: 
        [ { created: 2020-11-30T16:50:31.185Z,
            period: 0,
            status: 'trial',
            type: 'registration',
            uid: '7O8G5PACN4LRB6CVRC',
            reference: '',
            currency: 'ARS',
            total: 10,
            _id: ObjectId("5fc522d79d588f6ab036623b"),
            day: 30,
            month: 10,
            year: 2020,
            subscription: ObjectId("5bf36db84bcbac7920daa39f") } ],
       created: 2020-11-30T16:50:31.187Z,
       updated: 2020-11-30T16:50:31.192Z,
       __v: 0 },
     { _id: ObjectId("5c22e6fdfb82c614eaec2cb7"),
       uid: 'xKv3mPTa-',
       reference: 'xKv3mPTa-',
       status: 'active',
       customerData: 
        { name: 'Hola Prueba',
          identification: '12123123',
          email: 'demo@mobbex.com',
          phone: '15123123' },
       subscription: ObjectId("5bf36db84bcbac7920daa39f"),
       customer: ObjectId("5bf4d1a1d9641a151c0cc65b"),
       agenda: 
        [ { _id: ObjectId("5c22e6fdfb82c614eaec2cc3"), day: 26, month: 11 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cc2"), day: 25, month: 0 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cc1"), day: 25, month: 1 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cc0"), day: 25, month: 2 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cbf"), day: 25, month: 3 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cbe"), day: 25, month: 4 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cbd"), day: 25, month: 5 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cbc"), day: 25, month: 6 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cbb"), day: 25, month: 7 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cba"), day: 25, month: 8 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cb9"), day: 25, month: 9 },
          { _id: ObjectId("5c22e6fdfb82c614eaec2cb8"), day: 25, month: 10 } ],
       customerToken: 
        [ { active: true,
            _id: ObjectId("5c22e6fdfb82c614eaec2cc4"),
            customer: ObjectId("5bf4d1a1d9641a151c0cc65b"),
            token: ObjectId("5c22e6edfb82c614eaec2cad"),
            entitySource: ObjectId("5bb0efa2565353000efe2a19"),
            entityInstallment: ObjectId("5bb0ef65565353000efe2a0c") } ],
       executions: 
        [ { created: 2018-12-26T02:27:09.826Z,
            period: 0,
            status: 'paid',
            uid: 'jfr_dAwH0',
            _id: ObjectId("5c22e6fdfb82c614eaec2cc5"),
            day: 25,
            month: 11 } ],
       created: 2018-12-26T02:27:09.830Z,
       updated: 2018-12-26T02:27:09.830Z,
       __v: 0,
       total: 9,
       startDate: 2018-12-26T03:00:00.000Z } ] }
{ subscribers: 
   [ { _id: ObjectId("5fc33ac804ffee77dc74a262"),
       uid: '2KDYL9EPI2ZU6SKYZ3',
       reference: 'demo_user_321',
       total: 0,
       setupFee: 0,
       test: false,
       customerData: 
        { identification: '32321321',
          email: 'demo@mobbex.com',
          name: 'Demo User' },
       sources: [],
       subscription: ObjectId("5fc33ab504ffee77dc74a260"),
       status: 'active',
       customer: ObjectId("5e9e93ee696b688246ba7a1c"),
       customerToken: [],
       executions: [],
       agenda: 
        [ 
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ac804ffee77dc74a26e"),
            day: 15,
            month: 11,
            period: 12 } ],
       startDate: 2021-01-15T03:00:00.000Z,
       created: 2020-11-29T06:08:08.588Z,
       updated: 2020-11-29T06:08:08.593Z,
       __v: 0 },
     { _id: ObjectId("5fc33ba4fc854b4170755364"),
       uid: 'V4JB942GQQ9S7AN5CR',
       reference: 'demo_user_321',
       total: 0,
       setupFee: 0,
       test: false,
       customerData: 
        { identification: '32321321',
          email: 'demo@mobbex.com',
          name: 'Demo User' },
       sources: [],
       subscription: ObjectId("5fc33ab504ffee77dc74a260"),
       status: 'active',
       customer: ObjectId("5e9e93ee696b688246ba7a1c"),
       customerToken: 
        [ { active: false,
            _id: ObjectId("5fc33f202d6b4e6638ad5c89"),
            token: ObjectId("5fc33f1c2d6b4e6638ad5c70") },
          { active: false,
            _id: ObjectId("5fc33fc62d6b4e6638ad5caa"),
            token: ObjectId("5fc33fc32d6b4e6638ad5c91") },
          { active: false,
            _id: ObjectId("5fc3400e2d6b4e6638ad5cc9"),
            token: ObjectId("5fc3400b2d6b4e6638ad5cb0") },
          { active: false,
            _id: ObjectId("5fc3411a2d6b4e6638ad5cee"),
            token: ObjectId("5fc341172d6b4e6638ad5cd5") },
          { active: true,
            _id: ObjectId("5fc34276d260ebee34c358df"),
            token: ObjectId("5fc34273d260ebee34c358c6") } ],
       executions: [],
       agenda: 
        [ { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b4170755365"),
            day: 15,
            month: 0,
            period: 1 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b4170755366"),
            day: 15,
            month: 1,
            period: 2 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b4170755367"),
            day: 15,
            month: 2,
            period: 3 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b4170755368"),
            day: 15,
            month: 3,
            period: 4 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b4170755369"),
            day: 15,
            month: 4,
            period: 5 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b417075536a"),
            day: 15,
            month: 5,
            period: 6 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b417075536b"),
            day: 15,
            month: 6,
            period: 7 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b417075536c"),
            day: 15,
            month: 7,
            period: 8 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b417075536d"),
            day: 15,
            month: 8,
            period: 9 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b417075536e"),
            day: 15,
            month: 9,
            period: 10 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b417075536f"),
            day: 15,
            month: 10,
            period: 11 },
          { type: 'period',
            year: 0,
            _id: ObjectId("5fc33ba4fc854b4170755370"),
            day: 15,
            month: 11,
            period: 12 } ],
       startDate: 2021-01-15T03:00:00.000Z,
       created: 2020-11-29T06:11:48.966Z,
       updated: 2020-11-29T06:11:48.973Z,
       __v: 0 } ] }

My aggregation in mogosh was:

```db.appsubscriptionsplans.aggregate([{
              '$match': {
                'entity': ObjectId('577660654629781000df9552'), 
                'status': 'active'
              }
            }, 
            {
              '$lookup': {
                'from': 'appsubscriptionssubscribers', 
                'localField': '_id', 
                'foreignField': 'subscription', 
                'as': 'subscribers'
              }
            }, 
            {
              '$match': {
                'subscribers.0': {
                  '$exists': true
                }
              }
            },
            //{ $skip : batch.skip },
            { $limit : 2 },  
            {
              '$project': {
                '_id': 0, 
                'subscribers': 1
              }
            }]);`

Try my version with this at the end.

1 Like

This is the return in mogosh: { subs: [] }

Not possible because you had something a minute ago :smiley: !
You did something wrong.

1 Like

Use the “import pipeline from text” option in Compass to import the entire pipeline I shared earlier.

1 Like

Also I suggest you have a look to this free training that will be useful for sure :wink: !

1 Like

yes, in Compass already at stage $group “subs” is an empty array

1 Like

Fix the earlier stage then. You can also disable some temporarily.

The earlier stage is the $unwind you made…

$unwind breaks arrays into multiple docs. If you have nothing after that stage, it means the array subscribers is empty in all the docs you have at this stage.
So something’s wrong above that.

1 Like