title: How to create a request for a complex query? @Query jpql spring jpa
body: <p>How to create a request for a complex query in <code>JpaRepository</code> with the use of <code>@Query</code>?
  I am concerned about the relationships between entities. They may affect the preparation of the request.</p>
  
  <p>Needed query SQL, my version @Query:</p>