[web2py] Accessing some sum

2019-08-02 Thread Val K
It is not a bug, as you probably know dal does not support fields aliases and '_extra' is workaround. When do you get an error? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Accessing some sum

2019-08-02 Thread Dave S
In the book, sum of selects is described as: Similarly, you can use the sum operator to add (sum) the values of a specific field from a group of records. As in the case of count, the result of a sum is retrieved via the storage object: >>> sum = db.log.severity.sum() >>> print db().select(sum).