Hi Lukas, You're absolutely right, my code example should have been:
SELECT col1, col2, col3FROM my_tableGROUP BY 1,2,3 Thanks for the quick reply. On Wednesday, January 24, 2018 at 2:24:16 AM UTC-5, Lukas Eder wrote: > > Hi Max, > > Sure, just use orderBy(int...): > > https://www.jooq.org/javadoc/latest/org/jooq/SelectOrderByStep.html#orderBy-int...- > > <https://www.google.com/url?q=https%3A%2F%2Fwww.jooq.org%2Fjavadoc%2Flatest%2Forg%2Fjooq%2FSelectOrderByStep.html%23orderBy-int...-&sa=D&sntz=1&usg=AFQjCNFtTJ-aIEH0O5p1LWn0R8iNlTBhQw> > > Your mail said ORDER BY, but your subject said GROUP BY. There's no such > API method for referencing columns by index in GROUP BY, because only few > databases support it, and I don't think it's a good idea (because it would > be possible to reference an expression containing aggregate functions, > which doesn't work). But you can still do it by passing DSL.inline(index) > to the GROUP BY clause. > > 2018-01-23 23:33 GMT+01:00 Max Kremer <mkr...@trialfire.com <javascript:>> > : >> >> Yes I know why this may be bad practice etc. etc.... But I'd like to know >> if it's possible. >> > > jOOQ doesn't judge you :-) If you can do it with SQL, you can do it with > jOOQ. > -- 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 jooq-user+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.