}
final CompoundSelection<Tuple> selection = cb.tuple(requestDateByType, cb.count(requestRoot));
cbQuery.select(selection)
.where(whereClause)
.groupBy(requestDateByType)
.orderBy(cb.desc(requestDateByType));
final TypedQuery<Tuple> query = _EntityManager.createQuery(cbQuery);
List<Tuple> stats = query.getResultList();
return Lists.transform(stats, new Function<Tuple, Pair<T, Integer>>() {