I have got same problem in Hibernate 4.3.7.Final (OracleDialect). It is funny, but if remove INSERT part from HQL, then I get correct SQL for select with correct aliases in the subquery.