> Yes, there is. > > Asking for a GROUP BY function in Django's ORM misses the point > entirely of why an ORM exists. Django's ORM isn't SQL. Django's ORM > provides an abstraction layer that is able to make an arbitrary data > store appear like a collection of related objects. There's no > requirement that the data store be a relational database. Therefore, > adding GROUP BY -- a very RDBMS specific construction -- to Django's > ORM makes no sense. > > If you want to write SQL, write SQL. Django's object model provides > the raw() call for exactly this reason.
Thank you for the insightful answer :) Hmm so, I don't think that 'group by' needs to be RBDMS specific - why do you ? (there are other ways to implement it for non-RBDMS db's (even if it isn't purely done in the database) ). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

