title: How do I do a JPQL SubQuery?
body: <p>It is possible to do the equivalent of this sql query in JPQL?</p>
  
  <pre><code>SELECT * 
   FROM COUNTRIES c WHERE COUNTRY_ID IN (
    SELECT DISTINCT COUNTRY_ID 
     FROM PORTS p 
     WHERE p.COUNTRY_ID = c.COUNTRY_ID AND STATE = 'A'
  ) 
  </code></pre>