yes. for example
t=db.define_table('mytable',SQLField('name'),SQLField('price','double'))
print db(t.id>0).count()
rows=db(t.id>0).select(t.ALL,t.price.sum(),orderby=t.name,groupby=t.name)
for row in rows: print row.name, row._extra[t.price.sum()]
Massimo
On Oct 20, 3:04 am, David Marko <[EMAIL PROTECTED]> wrote:
> Hello to all,
> does web2py ORM support aggregate operations like 'sum', 'count' etc?
>
> Thanks for info,
> David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---