title: SpringData : is it possible to have subqueries in the Query annotation?
body: <p>I would like to know if it is possible to have subquery in a @Query annotation (org.springframework.data.jpa.repository.Query;)</p>
  
  <p>I am getting a QuerySyntaxException on the first subquery parentesis.</p>
  
  <p>Here is my query</p>
  
  <pre><code>@Query(value="select c1 from ComplaintModel c1, "
  + "(select c2.id, min(cb.termDate) minDate from ComplaintModel c2 "
  + "join c2.complaintBullets cb join cb.status s where s.code = ?1 "
  + "group by c2.id) tmp where c1.id = tmp.id order by tmp.minDate")
  </code></pre>
  
  <p>Thanks!</p>