1👍
You have to do this with values() but restrict fields that you want to group by
Core.objects.values('age_id', 'cat_id').filter(state='ABC').annotate(Max('date'), Count('age_id', 'cat_id'))
Source:stackexchange.com
1👍
You have to do this with values() but restrict fields that you want to group by
Core.objects.values('age_id', 'cat_id').filter(state='ABC').annotate(Max('date'), Count('age_id', 'cat_id'))