I have a document similar like this in mongodb with collection name: "movie" :-
collection = movie
[{
"_id": {
"$oid": "573a1390f29313caabcd446f"
},
"imdb": {
"rating": 6.6,
"votes": 1375,
"id": 832
},
"review": {
"rating": 6.6,
"votes": 1375,
"id": 832
}
},
{
"_id": {
"$oid": "573a1390f29313caabcd45f7"
},
"imdb": {
"rating": 4.6,
"votes": 1375,
"id": 832
},
"review": {
"rating": 8,
"votes": 432,
"id": 322
}
}]
How can I make a pipeline to group and count the number of based on the average of rating in review?