📅  最后修改于: 2022-03-11 14:46:06.192000             🧑  作者: Mango
# Count Avg Sum etc. take a distinct argument for finding unique values
p = Project.objects.all().annotate(Count('unit__name', distinct=True))