Skip to content
Advertisement

Group by time with postgres and jooq

How to group by minute, hour, day, or week in jooq. I have found out that in postgres we can use date_trunc('minute', created_at) function for that.

The simplified SQL I am using for that is:

How can I achieve the equivalent with jooq?

Advertisement

Answer

As always, if you’re missing support for some vendor-specific functionality, you can easily build it yourself using plain SQL templating

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement