yes and no. You can do: morehits = db.mytable.myhits.sum() rows=db().select(db.mytable.mydate,morehits,groupby=db.mytable.mydate) for row in rows: print row.mytable.mydate, row._extra[morehits]
but the morehits does not appear in the actual generated SQL because there is no need to. On Jun 18, 2:15 pm, sebastian <sebastianov...@gmail.com> wrote: > Hi, > > is it possible to run this select using DAL ? > > select date,sum(hits) as morehits from report group by date > > (see the "as") > > thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---