Can you let me know in brief on actually what you are doing with subscription collection. Like a detailed explanation, then I can try to build the query
For what i’ve gathered you are trying to find
all rows of subscription that has enterpriceID === ctx.query.enterprise_id AND it’s subscription_status is either ToBeSubscribed OR ToBeUnsubscribed and then paginating it with start and limit but what about this api_id:1
If api_id needs to be 1 all the time we can add it to AND condition ??