print db().select(db.tab1.f2.sum()/db.tab1.f2.count(), groupby=db.tab1.f1) Richard
On Thu, May 17, 2012 at 2:38 PM, Richard Vézina <[email protected] > wrote: > Yeah, that's what I thought just after press send :) > > Richard > > > On Thu, May 17, 2012 at 2:33 PM, Jim Steil <[email protected]> wrote: > >> I see sum, min, and max aggregates in the book at section 6.24.4, but no >> avg. But, using sum and count (from 6.21.3) you could get there. >> >> -Jim >> >> >> On 5/17/2012 1:25 PM, Richard Vézina wrote: >> >>> Hello, >>> >>> How I can make an avg() aggregate with web2py? >>> >>> Richard >>> >> >

