human
How to do this GROUP BY query in Django's ORM with annotate and aggregate
assistant
Here is some code to group the values from django model `Article` with group by value `pub_date` and annotate by `title`

Article.objects.values('pub_date').annotate(article_count=Count('title'))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.