Hi!

Example:
I have a table "pictures" with columns "format", "size", and "color". I
want to get items grouped by "color":

res = session.query(Picture).group_by(Picture.c.color).select()

but PostgreSQL reports that format and size must be in the GROUP BY or
in a aggregate function (because it doesn't know which values it can
pick). Can I tell SA that it should apply e.g. MIN() function to all
columns not included in the GROUP BY?

Thanks.

David

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to