title: How can i inner join a subquery in JPQL
body: <p>I need  a JPQL for the MySQL query:</p>
  
  <pre><code>SELECT * 
  FROM table1 t1 
  INNER JOIN table2 t2 
    ON t1.id = t2.table1.id 
  INNER JOIN (SELECT * FROM table1 t3 
              INNER JOIN table2 t4 ON t3.id = t4.table1.id 
              WHERE t3.name = 'xxx') subTable 
    ON t1.number = subTable.number 
  WHERE t1.number = '5' 
    AND id = '3'
  </code></pre>