On May 2, 2007, at 11:23 AM, Glauco wrote:
> > Example: > > create table people ( > name text, > surname text, > type CASE 'A','B','C' > ) > > > There is no solution to do for example the simple query based over > the mapper People: > select count(type) from people group by type; > first of all, i dont understand why youd want to GROUP BY a column used in an aggregate. but anyway: select([func.count(People.c.type)], group_by=[People.c.type]) > only solution is to use the select functioon. i fail to see why thats a problem. if you want a SELECT to return tuple results, it follows that you should use select(). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---