Hello,
I described my project structure  and the problem in this link 
<http://stackoverflow.com/questions/23961205/complex-jpql-query-to-list-last-created-file-from-all-archives>:
 
 
http://stackoverflow.com/questions/23961205/complex-jpql-query-to-list-last-created-file-from-all-archives

With that in mind and knowing that is possible to solve the problem with 
the above native query:

    SELECT * FROM archive AS a WHERE a.id IN(
        SELECT af.archive_id FROM(
            SELECT af.*
            FROM archive_file af
            INNER JOIN
            (SELECT archive_id, MAX(created) AS MaxDateTime
                FROM archive_file
                GROUP BY archive_id) gaf 
            ON af.archive_id = gaf.archive_id 
            AND af.created = gaf.MaxDateTime) as af 
        WHERE af.expire > '2014-06-01' AND af.expire < '2014-07-01')

I want to know if is possible in JOOQ to make a equivalent query to get the 
same result?

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to