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")
while ( results.hasNext() )
Object row = (Object) results.next();
Color type = (Color) row;
Date oldest = (Date) row;
Integer count = (Integer) row;