JPA Criteria select from another query
<p>I am trying to select information from another query, like:</p>

<pre><code>SELECT user.user_id, product.first_time
FROM USER AS user
INNER JOIN (SELECT min(product.first_time) as first_time,
                   product.user_id
            FROM PRODUCT AS product
            GROUP BY (product.user_id)
           ) product
ON user.user_id = product.user_id
</code></pre>

<p>but i don't know how to create a Criteria Query to execute it.
Can I execute it with Criteria API?</p>