Hello,

I would like to query database with Django ORM and add GROUP BY clause 
without including unnecessary counting, avg, etc.
I can force/hack queryset by settting qs.query.group_by=['my_column'], but 
this is unclean and risky.

Is possible something like:

MyModel.objects.filter(...).group_by('my_column')

?

Kind Regards,
Marcin

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/64f4b422-7704-413d-a9c5-837c53eaefc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to