The first jooq user is here. I need to convert a regular SQL statement with nested selection below to jooq. Any idea if I'm on the right track? I appreciate any help.
This is what I have, but not sure what is even correct:
Result<Record> profiles = dsl_
.select(PROFILE.fields())
.from(PROFILE)
.where(PROFILE.PROFILE_ID, PROFILE.EFFECTIVE_DATE) in (create
.select(PROFILE.PROFILE_ID, max(PROFILE.EFFECTIVE_DATE) as date
.from(PROFILE)
.groupBy(PROFILE.PROFILE_ID)))
.fetch();
hln98 source
share