But is not "suma" I want to show, the entire operation "(suma / superficie) 
> * 100" 
>

percentage = (suma / tb_establecimientos.superficie) * 100
rows = db(qry).select(..., percentage, ...)
rows[0][percentage]

Or, keeping the code as you have it, you could do:

rows[0]['((SUM(lotes.superficie) / establecimientos.superficie) * 100.0)']

For more details, see 
https://groups.google.com/d/msg/web2py/WAw9Z97HJjU/b4XRX2w3xu8J.

Anthony

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to