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 <pistacc...@gmail.com> 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 web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to