Count可以接受一个
distinct参数,就像这样:
p = Project.objects.all().annotate(Count('informationunit__username', distinct=True))似乎没有记录在案,但您可以在Count的源代码中找到它。

Count可以接受一个
distinct参数,就像这样:
p = Project.objects.all().annotate(Count('informationunit__username', distinct=True))似乎没有记录在案,但您可以在Count的源代码中找到它。
上一篇 熊猫to_html使用.style选项还是自定义CSS?
下一篇 multiprocessing.pool.MaybeEncodingError:'TypeError(“无法序列化'_io.BufferedReader'对象”,)