Nevermind, i found it in the book minutes after posting :) For those interested: count = db.table.field.count() result = db().select(db.table.field, count, groupby = db.table.field)
On 24 Gen, 18:22, pistacchio <[email protected]> wrote: > How to translate the following SQL query in a web2py DAL expression? > Thanks > > SELECT field, count(*) FROM table GROUP BY field -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

