📅  最后修改于: 2022-03-11 14:47:24.942000             🧑  作者: Mango
from django.db.models import Count
result = Books.objects.values('author')
.order_by('author')
.annotate(count=Count('author'))