Queries can specify a property of a class in the select clause. Here we can can even call SQL aggregate functions. Properties or aggregates are considered "scalar" results and not entities in persistent state.
Iterator results = session.createQuery( "select student.color, min(student.birthdate), count(student) from Student student " +
"group by student.color")
.list()
.iterator();
while ( results.hasNext() )
{
Object[] row = (Object[]) results.next();
Color type = (Color) row[0];
Date oldest = (Date) row[1];
Integer count = (Integer) row[2];
.....
}