title: Using group by and having in a JPA query
body: <p>How would you do the following using the JPA query language?</p>
  
  <pre><code>select * from person where email in
  (select email from person group by email having count(email)&gt;1)
  </code></pre>