Open heynemann opened 10 years ago
Implement the count Aggregation as in:
prices=Aggregation.count(Document.price)
This translates to aggregation query:
totalPrice: { $sum: 1 }
The key thing here is that count uses sum to add 1 for each document.
As can be seen in http://docs.mongodb.org/manual/reference/aggregation/group/#pipe._S_group.
This ticket is related to #46.
Implement the count Aggregation as in:
This translates to aggregation query:
The key thing here is that count uses sum to add 1 for each document.
As can be seen in http://docs.mongodb.org/manual/reference/aggregation/group/#pipe._S_group.
This ticket is related to #46.