📜  .annotate unique distinct - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:06.192000             🧑  作者: Mango

代码示例1
# Count Avg Sum etc. take a distinct argument for finding unique values
p = Project.objects.all().annotate(Count('unit__name', distinct=True))