Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

.annotate unique distinct

# Count Avg Sum etc. take a distinct argument for finding unique values
p = Project.objects.all().annotate(Count('unit__name', distinct=True))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unique #distinct
ADD COMMENT
Topic
Name
3+5 =