1👍
✅
You can do this:
from django.db.models import Count
jobs.objects.values('states').annotate(count=Count('states'))
0👍
It seems to be tricky, but u can do this by refer “https://docs.djangoproject.com/en/dev/ref/models/querysets/“
👤USER
Source:stackexchange.com