seems the following will do the job: group_columns = [table.c.col1, table.c.col2] select_columns = group_columns + [sqlalchemy.func.sum(table.c.col3), sqlalchemy.func.sum(table.c.col4)] statement = sqlalchemy.select( select_columns, (table.c.col1 == "test"), group_by=group_columns) res = statement.execute().fetchall()
hth Stefan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---