Find the scene with the most replicas in the scene (you must specify the name of the play, act and scene)

Viewed 17

I've used this but it's not what I need at all

db.william.aggregate([
    {$unwind:"$acts"},
    {$unwind:"$acts.scenes"},
    {$unwind:"$acts.scenes.action"},
    {$unwind:"$acts.scenes.action.says"},
    {$sortByCount:"$acts.scenes.action.says"}
])
0 Answers
Related