Hi, in the docs it uses this code as an example.
for row in db().select( db.person.ALL, orderby=db.person.name, groupby=db.person.name): print row.name Alex Bob Carl When I run this code it fails. rsSuppliers = db().select( db.weekly_data.ALL, orderby=db.weekly_data.supplier_name, groupby=db.weekly_data. supplier_code) I get this error gluon.contrib.pg8000.errors.ProgrammingError: ('ERROR', '42803', 'column "weekly_data.id" must appear in the GROUP BY clause or be used in an aggregate function') I think this issue is related specifically to postgres. How do I group by supplier_code and get the first supplier_name? -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.