I need to find the difference between two timestamps in seconds using JOOQ. I have taken a look at some answers on StackOverflow using raw SQL, however i didn´t find a way to implement it using JOOQ.
Here are some solutions that i found that are using raw SQL:
Use
DSL.timestampDiff(timestamp1, timestamp2)
. It will return the difference in terms of anINTERVAL DAY TO SECOND
type:org.jooq.types.DayToSecond