私は Java が初めてで、Java で mongoDB クエリを作成する方法を知りたいです。
db.coll.aggregate(
{ $match : {
loc: {
"$ref" : "location",
"$id" : ObjectId("4fe69610e7e9fa378c3c802e")
}
}},
{ $unwind : "$ActivityList" },
{ $match : {
'ActivityList.user': {
"$ref" : "userProfile",
"$id" : ObjectId("4fdeafe1de26fd298262bb82")
}
}},
{ $group : {
_id : "$ActivityList.type",
latest: { $max: '$ActivityList.timestamp' }
}}
);
ご協力いただきありがとうございます。