vince
vince

Reputation: 8306

"..." in MongoDB Shell (version 3.2)

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!

Upvotes: 1

Views: 118

Answers (1)

tengobash
tengobash

Reputation: 367

I guess you have a brace too much

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

Upvotes: 1

Related Questions