 <p>You have to do this with <a href="https://docs.djangoproject.com/en/1.10/ref/models/querysets/#values" rel="nofollow">values()</a> but restrict fields that you want to group by</p> <pre><code>Core.objects.values('age_id', 'cat_id').filter(state='ABC').annotate(Max('date'), Count('age_id', 'cat_id')) </code></pre>