[Answered ]-Django, efficiently retrieve the count of multiple field filters

2👍

Yes, with aggregation.

from django.db.models import Count
street_counts = Person.objects.values('street_name').annotate(Count('street_name'))

Leave a comment