{
"_id": {
"$__id": "608028497a90cf06c02b1083"
},
"name": "Player Unknown's Batteground Mobile",
"publisher_detail": "Bluehole Corporation",
"release_date": {
"$date": "2017-03-26T18:30:00.000Z"
},
"version": "1.2.0",
"genre": "action",
"rating": 100,
"achievement": [{
"name": "Ace",
"players": [{
"player_name": "notAplayer",
"score": 60,
"date_of_achievement": {
"$date": "2019-02-14T18:30:00.000Z"
},
{
"player_name": "notAplayer2",
"score": 92,
"date_of_achievement": {
"$date": "2020-04-14T18:30:00.000Z"
}
}]
}]
}
I have the following mongodb schema for a gaming system.I want to write a query to find maximum score in each game. Not able to figure out what to do!