I need a list of sales.product, sales.date, continent.name, sales.amount.sum() with just one summed row per sales.product, sales.date, continent.name ! basically a sales total per product, day and continent.
something like Banana 20090520 Europe 123 Apple 20090520 Europe 234 Apple 20090520 Asia 456 db.define_table('sales', SQLField('product'), SQLField('date'), SQLField('country','reference country',requires=IS_IN_DB (db,'country.id','%(name)s')), SQLField('amount','integer')) db.define_table('country', SQLField('name'), SQLField('continent','reference continent',requires=IS_IN_DB (db,'continent.id','%(name)s'))) db.define_table('continent', SQLField('name')) how should the web2py query/select look like? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---