Hi

10 views
Skip to first unread message

avinash reddy

unread,
Jun 19, 2013, 12:22:21 AM6/19/13
to mongod...@googlegroups.com
Hi All,

I want to convert mongodb query into of type Query()

To get a list list using mongotemplate

example query:

db.fbads_hourly_period_ads_stats.aggregate( [   { $match: { adgroup_id: '1447'} },   { $group: { _id: {"adgroup_id":"$adgroup_id","step":"$step","sub":"$sub"}, Impressions: { $sum: "$imp" }, Clicks: { $sum: "$clicks" }, Installs: { $sum: "$installs" }, Spent: { $sum: "$spent" },Earn: { $sum: "$earn" } } }] );

into

Query query = new Query(Criteria.where("adgroup_id").is("20348"));
Reply all
Reply to author
Forward
0 new messages