这是我的 mondb 集合:
{ "_id" : ObjectId("50033fb1ecc250aa369a678a"), "ID" : 1, "FirstName" : "ijaz",
"LastName" : "alam", "Age" : 21, "Address" : "peshawer" }
{ "_id" : ObjectId("50033fc2ecc250aa369a678b"), "ID" : 2, "FirstName" : "ashfaq"
,"LastName" : "khan", "Age" : 1921, "Address" : "sadkabad" }
{ "_id" : ObjectId("50033fdeecc250aa369a678c"), "ID" : 3, "FirstName" : "danyal"
,"LastName" : "alam", "Age" : 18, "Address" : "lahore" }
{ "_id" : ObjectId("50033ff7ecc250aa369a678d"), "ID" : 43, "FirstName" : "shahzad"
, "LastName" : "sad", "Age" : 22, "Address" : "nazirabad" }
现在我想通过java驱动程序使用group,distinct和count等聚合函数,或者如何通过java驱动程序在查询中实现聚合函数。