How to make grouping without selecting the column?
detachedCriteria.setProjection(Projections.groupProperty("col1"));
OR
detachedCriteria.setProjection(Projections.sqlGroupProjection("col1", "col1", new String[]{}, new Type[] {Hibernate.INTEGER}));