Mongodb query equivalent of the following SQL query Use aggregation db.UserData.aggregate({$group:{_id:”$category”, “maxValue”:{$max:”$value”}}});