I have a database with over 1000 reviews, I am trying to list all of the reviewers who have written at least 5 reviews, I am trying to show the reviewer ID, reviewer name, and number of reviews for each user and then list the names in alphabetical order, I have attempted it several times and just do not understand, my code is below;
db.P_reviews.aggregate([{
$group:{ _id: { “_reviewerID” : “$_reviewerID” },
{ $match: { “_reviewCount”:{$gt:4}}},
{ $project : { “_reviewerID”:1, “_reviewerName”:1, “_reviewerCount”:1}}}}])
I do not understand what is wrong here