2008/10/20 mdipierro <mdipie...@cs.depaul.edu>

>
> 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 <dma...@tiscali.cz> 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 web2py@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