working example controller: def person(): sum = db.t_payement.f_value.sum() rows= db().select(db.t_person.f_name,db.t_person.f_surname,db.t_person.f_city, sum, groupby=db.t_person.id, left=db.t_payement.on(db.t_person.id==db.t_payement.f_person)) return dict(rows=rows, sum=sum)
view: {{for row in rows:}} {{=TR(TD(row.t_person.f_name),TD(row[sum]))}} {{pass}}