Without more detail, a good place to start would be with the ORM aggregation documentation:
https://docs.djangoproject.com/en/1.7/topics/db/aggregation/#filter-and-exclude I would advise reading the whole page, though. Note that the placement/order of filters are much more significant than with normal ORM queries when using aggregation, but the section I linked to should explain that. -James On Fri, Feb 20, 2015 at 1:08 AM, SHINTO PETER <shinto....@gmail.com> wrote: > How to filter by Group_BY ? > > -- > 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 django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/3b251918-cc2c-4602-b810-a24485f05a78%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/3b251918-cc2c-4602-b810-a24485f05a78%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciUW7MZ1xhnFXGjkAaHrO%2BeosnV_khgS%3Dq%3DCiUmu_KoHxQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.