Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

query first 5 element in django

Employer.objects.values('id').annotate(jobtitle_count=Count('jobtitle')).order_by('-jobtitle_count')[:5]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #query #element #django
ADD COMMENT
Topic
Name
4+3 =