The information you provided would be appropriate if you were asking us to help you write the SQL. HQL is based on objects, so for us to help you with this we need to see your objects and the hibernate relationships.