mongodb
时间:2021-07-01 10:21:17
帮助过:25人阅读
group =
new BsonDocument
{
{ "$group",
new BsonDocument
{
{ "_id",
new BsonDocument { {
"Age",
"$Age"} ,{
"Sex",
"$Sex" } }},
{"Count",
new BsonDocument{ {
"$sum",
1 } } }
}
}
};
var pipeline =
new[] { group };
var result = collection.Aggregate(pipeline);
mongodb
标签:data article bsp 3.0 bpa count gre .exe pipeline