mongodb去重复统计查询

我用的robomongo,要统计不重复的数据
比如图片说明
我要统计2017-03-24当天的数据有3条,根据age去重查询的数据有2条
我要怎样写查询,,,,,,新手求教!!

Datastore datastore = simpleMongoDBDao.getDB();
Query<类> query = datastore.createQuery(类.class);
query=query.filter("条件字段 = ", “”);
AggregationPipeline pipeline = datastore.createAggregation(类.class)
.match(query)
.group(
id(
grouping("age")
),
grouping("name","name"),
grouping("age",first("age"))
).sort(Sort.descending("time"));
Iterator<类> iterator = pipeline.aggregate(类.class);

http://blog.csdn.net/mchdba/article/details/50455071

Java查询mongdb,根据某一个字段的值进行去重,求教

select distinct 字段