Is there a way to use sql-server like analytic functions in Hibernate?
Something like
select foo from Foo foo where f.x = max(f.x) over (partition by f.y)