print([v for v in
Request.objects.annotate(month=ExtractMonth('date_creation'),
year=ExtractYear('date_creation'),)
.order_by()
.values('month', 'year')
.annotate(total=Count('*'))
.values('month', 'year', 'total')
])
from django.db.models.functions import ExtractMonth
Sales.objects
.annotate(month=ExtractMonth('timestamp'))
.values('month')
.annotate(count=Count('id'))
.values('month', 'count')