db.colection.aggregate(pipeline,options) alt text alt text give a count per age of male teachers! alt text give a count per age of male students and sort them by count in desc manner! alt text alt text