title: JPA Criteria API for WITH clause and subquery in FROM clause
body: <p>I`m new to JPA and I would like to implement a query that contains WITH clause, and also subquery in FROM clause by using JPA Criteria API, for example:</p>
  
  <pre><code>WITH A AS(...) SELECT a1,a2 FROM A
  </code></pre>
  
  <p>and also:</p>
  
  <pre><code>SELECT b1, b2 FROM (SELECT c1,c2 FROM ...)
  </code></pre>
  
  <p>How do I supposed to achieve this goal by using JPA Criteria? Or is there any alternative solution is fine.</p>
  
  <p>thanks for helping </p>