Creating a pageable query where each entity has no more than N children

Answering your questions:

1 - I think it's ok to fetch this data in one query.

2 - One way you could do it is making a query to bring your top artists and then in your Java code filter the top 3. Another way would be to define the elements size of your page to 3, since the `limit` clause is not supported in hql. There are some ways to compare dates on HQL, you can use the BETWEEN X AND Y clause for example.

I found this post on stackoverflow about limiting the result, maybe it can help you! How do you do a limit query in JPQL or HQL?