Closed mfrasca closed 7 years ago
or, less redundant:
db.plants.aggregate(
{$group: {_id: {species:"$species", garden: "$garden"}, count: {$sum: 1}}},
{$group: {_id: {species:"$_id.species"}, garden: {$push: "$_id.garden"}, count: {$push: "$count"}}})
this is done, now the user interface
something like this, and who knows better please tell me better.