Comment Comment by JanecekPetr For me the aha moment was to understand the logical order of SQL operations: https://blog.jooq.org/a-beginners-guide-to-the-true-order-of.... Never had a problem since. parent JanecekPetr 4 years ago