On Aug 6, 6:54 am, Dutch opera <dutchop...@gmail.com> wrote:
> db().select(db.test.date,db.
> test.url,db.test.hits.sum(), db.test.rev.sum(), groupby=
> db.test.datel)
> What is the name of the hits field?  In SQL I would do sum(hits) as
> sum_hits and sum(rev) as sum_rev

rows = db().select(db.test.date,db.test.url,db.test.hits.sum(),
db.test.rev.sum(), groupby=db.test.datel)
for row in rows:
    hits_sum = row._extra[db.test.hits.sum()]

F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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