MongoDB query similar to SELECT COUNT GROUP BY
My MongoDB database has the 'interviews' collection whose document structure is similar to this: { "_id" : ObjectId("632b97b0f2bd3f64bbc30ec8"), "agency" : "AG1", "year" : "2022", "month" : "9", "residents" : [ { "sequential" : 1, "name" : "Resident 1", "statusResident" :…