i have solved the problem without need of maintaining another collecti
Search for question
Question
I have solved the problem without need of maintaining another collection or even without $group traversing whole collection, hence posting my own answer.