Hello. I found problem to use db.games.aggregate in a database with tables organised hierarchy

Fernando Richter Vidal shared this problem 4 years ago
Cannot Reproduce

The tool doesn't work to group a column in table organised hierarchy.


For example $teams.0.name" doesn't work. It's necessary to use $teams.name" but this is wrong, because $teams.0.name" and $teams.1.name" are different names.


db.games.aggregate([

{

$match : {

"teams.0.name" : "Los Angeles Lakers"

}

}

])

.group({

_id: "$teams.0.name", yo: {$avg: '$teams.score' }

})

Replies (1)

photo
1

Thanks for opening your first issue here! Did you try the above script with mongo shell? Is the same result output? If the output is the same, then it's probably not a problem with NoSQLBooster.

If you're reporting a /1f41e bug, please make sure you include steps to reproduce it.

  • NoSQLBooster Version
  • Operating System (Windows/Mac/Ubuntu):
  • Expected Behavior
  • Actual Behavior
  • How to Reproduce (please include example JSON data)
  • Screenshots

Leave a Comment
 
Attach a file