I'm a newbie to MongoDB and Casbah and I'm wondering if anyone can help me please.
I have the following mongoDB Query that works,
db.getCollection('holidayRequests').aggregate
(
[
{ $match: { $and: [ { email: "leeroy.jenkins@company.com" } , { status: "APPROVED" } ] }},
{
$group:
{
_id: { email: "$email" },
totalAmount: { $sum: "$daysTaken" }
}
}
]
);
How do I convert this to a query the casbah driver will understand?