No pretty but possible. s=db.tablename.colname.sum() c=db.tablename.colname.count() rows=db().select(s,c,groupby=db.tablename.somecolname) for row in rows: print row._extra[s]/row._extra[c]
On Jun 23, 8:26 pm, "mr.freeze" <[email protected]> wrote: > How would I execute this sqlite statement with the existing DAL?: > select avg(columnname) from table; --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

