1

Currently running the following aggregate query in my mongo shell: db.zips.aggregate([{$group:{_id:{"state":"$state"},{population:{$sum: "$pop}}}]) and when I press enter, "..." shows up with a blinking cursor. Is it taking a long time to run or expecting me to continue typing?

Thanks!

vince
  • 7,808
  • 3
  • 34
  • 41

1 Answers1

1

I guess you have a brace too much

db.zips.aggregate([
    {
        $group:{
            _id: {"state":"$state"},
            {population:{$sum: "$pop} // <- Brace at population too much?
        }
    }
])
tengobash
  • 357
  • 3
  • 10