| That's not true, there is no need for window functions to determine the count. You could transform the query to only count the distinct groups. All this is done for you behind the scenes with the Blaze-Persistence Pagination API which translates to plain JPQL/HQL, so you can look into how these transformations work if you like. |